diff --git a/automation.yaml b/automation.yaml index 1f143f8..665f3f6 100644 --- a/automation.yaml +++ b/automation.yaml @@ -1,6 +1,21 @@ +# General +- !include automations/good_morning.yaml +- !include automations/good_night.yaml # Sun Based - !include automations/sunset_outside_on.yaml - !include automations/sunset_inside_on.yaml +- !include automations/sunset_outside_off.yaml +- !include automations/sunset_inside_off.yaml # Weather Based -- !include automations/cloudy_inside_on.yaml +- !include automations/cloudy_inside_on_home.yaml +# Jeff +- !include automations/jeff_manheim_enter.yaml +- !include automations/jeff_manheim_leave.yaml +- !include automations/jeff_home_enter.yaml +- !include automations/jeff_home_leave.yaml +#- !include automations/jeff_stationary.yaml +#- !include automations/jeff_driving.yaml +#- !include automations/jeff_walking.yaml +#- !include automations/jeff_driving.yaml +# Zone diff --git a/automations/cloudy_inside_on.yaml b/automations/cloudy_inside_on_home.yaml similarity index 53% rename from automations/cloudy_inside_on.yaml rename to automations/cloudy_inside_on_home.yaml index a5ebed4..dafd4ae 100644 --- a/automations/cloudy_inside_on.yaml +++ b/automations/cloudy_inside_on_home.yaml @@ -1,7 +1,7 @@ -alias: "Cloudy, inside on" +alias: "Cloudy, inside on if home" trigger: platform: time - after: '14:40:00' + after: '14:00:00' condition: - condition: numeric_state entity_id: sensor.dark_sky_cloud_coverage @@ -10,4 +10,7 @@ condition: entity_id: group.family state: "home" action: - service: script.inside_all_on + - service: notify.notify + data: + title: "It's Cloudy" + message: "It's Cloudy, you might need more light" diff --git a/automations/good_morning.yaml b/automations/good_morning.yaml new file mode 100644 index 0000000..017587f --- /dev/null +++ b/automations/good_morning.yaml @@ -0,0 +1,12 @@ +alias: "Good Morning" +trigger: + platform: sun + event: sunrise + offset: "-00:30:00" +action: + - service: scene.turn_on + entity_id: scene.livingroom_normal + - service: notify.notify + data: + title: 'Anchorage House' + message: "Good Morning, Anchorage House is up and online." diff --git a/automations/good_night.yaml b/automations/good_night.yaml new file mode 100644 index 0000000..40019f1 --- /dev/null +++ b/automations/good_night.yaml @@ -0,0 +1,13 @@ +alias: "Good Night" +trigger: + platform: time + hours: 22 + minutes: 00 + seconds: 00 +action: + - service: scene.turn_on + entity_id: scene.livingroom_night + - service: notify.notify + data: + title: 'Anchorage House' + message: "Shutting down for the night, Good Night" diff --git a/automations/jeff_driving.yaml b/automations/jeff_driving.yaml new file mode 100644 index 0000000..c142697 --- /dev/null +++ b/automations/jeff_driving.yaml @@ -0,0 +1,14 @@ +alias: 'Jeff Is Driving' +trigger: + platform: numeric_state + entity_id: sensor.jeff_velocity + above: 8 +condition: + condition: state + entity_id: device_tracker.owntracks_jeffreysphone + state: "not_home" +action: + - service: input_select.select_option + data: + entity_id: input_select.jeff_status + option: driving \ No newline at end of file diff --git a/automations/jeff_home_enter.yaml b/automations/jeff_home_enter.yaml new file mode 100644 index 0000000..dd79895 --- /dev/null +++ b/automations/jeff_home_enter.yaml @@ -0,0 +1,15 @@ +alias: "Jeff Arrives Home" +trigger: + platform: zone + event: enter + zone: zone.home + entity_id: device_tracker.jeffreysiphone +action: + - service: notify.notify + data: + title: 'Anchorage House' + message: "Jeff is home!" + - service: input_select.select_option + data: + entity_id: input_select.jeff_status + option: stationary \ No newline at end of file diff --git a/automations/jeff_home_leave.yaml b/automations/jeff_home_leave.yaml new file mode 100644 index 0000000..4a8a0b6 --- /dev/null +++ b/automations/jeff_home_leave.yaml @@ -0,0 +1,15 @@ +alias: "Jeff Leaves Home" +trigger: + platform: zone + event: leave + zone: zone.home + entity_id: device_tracker.jeffreysiphone +action: + - service: notify.notify + data: + title: 'Anchorage House' + message: "Jeff left home" + - service: input_select.select_option + data: + entity_id: input_select.jeff_status + option: moving \ No newline at end of file diff --git a/automations/jeff_manheim_enter.yaml b/automations/jeff_manheim_enter.yaml new file mode 100644 index 0000000..40ac5cb --- /dev/null +++ b/automations/jeff_manheim_enter.yaml @@ -0,0 +1,15 @@ +alias: "Jeff Arrives At Manheim" +trigger: + platform: zone + event: enter + zone: zone.manheim + entity_id: device_tracker.jeffreysiphone +action: + - service: notify.notify + data: + title: 'Anchorage House' + message: "Jeff arrived at Manheim" + - service: input_select.select_option + data: + entity_id: input_select.jeff_status + option: stationary \ No newline at end of file diff --git a/automations/jeff_manheim_leave.yaml b/automations/jeff_manheim_leave.yaml new file mode 100644 index 0000000..8835c4d --- /dev/null +++ b/automations/jeff_manheim_leave.yaml @@ -0,0 +1,15 @@ +alias: "Jeff Leaves Manheim" +trigger: + platform: zone + event: leave + zone: zone.manheim + entity_id: device_tracker.jeffreysiphone +action: + - service: notify.notify + data: + title: 'Anchorage House' + message: "Jeff left Manheim" + - service: input_select.select_option + data: + entity_id: input_select.jeff_status + option: moving \ No newline at end of file diff --git a/automations/jeff_stationary.yaml b/automations/jeff_stationary.yaml new file mode 100644 index 0000000..0c54251 --- /dev/null +++ b/automations/jeff_stationary.yaml @@ -0,0 +1,10 @@ +alias: 'Jeff Is Stationary' +trigger: + platform: numeric_state + entity_id: sensor.jeff_velocity + below: 2 +action: + - service: input_select.select_option + data: + entity_id: input_select.jeff_status + option: stationary \ No newline at end of file diff --git a/automations/jeff_walking.yaml b/automations/jeff_walking.yaml new file mode 100644 index 0000000..ad647e8 --- /dev/null +++ b/automations/jeff_walking.yaml @@ -0,0 +1,15 @@ +alias: 'Jeff Is Walking' +trigger: + platform: numeric_state + entity_id: sensor.jeff_velocity + above: 2 + below: 8 +condition: + condition: state + entity_id: device_tracker.owntracks_jeffreysphone + state: "not_home" +action: + - service: input_select.select_option + data: + entity_id: input_select.jeff_status + option: walking \ No newline at end of file diff --git a/automations/sunrise_inside_off.yaml b/automations/sunrise_inside_off.yaml new file mode 100644 index 0000000..64d0a8e --- /dev/null +++ b/automations/sunrise_inside_off.yaml @@ -0,0 +1,7 @@ +alias: "Sunset Inside on" +trigger: + platform: sun + event: sunset + offset: "+01:00:00" +action: + service: script.inside_all_off \ No newline at end of file diff --git a/automations/sunrise_outside_off.yaml b/automations/sunrise_outside_off.yaml new file mode 100644 index 0000000..e044409 --- /dev/null +++ b/automations/sunrise_outside_off.yaml @@ -0,0 +1,6 @@ +alias: "Sunset Outside off" +trigger: + platform: sun + event: sunrise +action: + service: script.outside_all_off \ No newline at end of file diff --git a/automations/test.yaml b/automations/test.yaml index 5eff3de..4d99153 100644 --- a/automations/test.yaml +++ b/automations/test.yaml @@ -1,9 +1,13 @@ -#trigger: -# platform: time +alias: test +trigger: + platform: time # Matches every hour at 5 minutes past whole -# minutes: 49 -# seconds: 00 -#action: -# service: switch.turn_on -# data: -# entity_id: switch.fireplace_lights \ No newline at end of file + minutes: 20 + seconds: 00 +action: + ##service: scene.turn_on + #entity_id: scene.livingroom_night + - service: notify.notify + data: + title: 'This is a test' + message: "his is a test" \ No newline at end of file