Added some basic sun and weather based automations

This commit is contained in:
Jeffrey Stone 2017-01-02 14:36:17 -05:00
parent 8527318b20
commit 23b60592c0
8 changed files with 77 additions and 2 deletions

6
automation.yaml Normal file
View File

@ -0,0 +1,6 @@
# Sun Based
- !include automations/sunset_outside_on.yaml
- !include automations/sunset_inside_on.yaml
# Weather Based
- !include automations/cloudy_inside_on.yaml

View File

@ -0,0 +1,13 @@
alias: "Cloudy, inside on"
trigger:
platform: time
after: '14:40:00'
condition:
- condition: numeric_state
entity_id: sensor.dark_sky_cloud_coverage
above: 90
- condition: state
entity_id: group.family
state: "home"
action:
service: script.inside_all_on

View File

@ -0,0 +1,7 @@
alias: "Sunset Inside on"
trigger:
platform: sun
event: sunset
offset: "-01:00:00"
action:
service: script.inside_all_on

View File

@ -0,0 +1,7 @@
alias: "Sunset Outside on"
trigger:
platform: sun
event: sunset
offset: "-00:30:00"
action:
service: script.outside_all_on

9
automations/test.yaml Normal file
View File

@ -0,0 +1,9 @@
#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

View File

@ -6,11 +6,12 @@ homeassistant:
time_zone: America/New_York time_zone: America/New_York
customize: !include customize.yaml customize: !include customize.yaml
group: !include groups.yaml group: !include groups.yaml
#automation: !include automation.yaml automation: !include automation.yaml
sensor: !include_dir_merge_list sensors sensor: !include_dir_merge_list sensors
switch: !include_dir_merge_list switches switch: !include_dir_merge_list switches
light: !include_dir_merge_list light script: !include scripts.yaml
alexa: !include alexa/intents.yaml alexa: !include alexa/intents.yaml
input_select: !include input_select.yaml
http: http:
api_password: !secret MY_API_PASS api_password: !secret MY_API_PASS

View File

@ -0,0 +1,12 @@
sequence:
- event: LOGBOOK_ENTRY
event_data:
name: EVENT
message: "Turning inside lights on."
- service: switch.turn_on
data:
entity_id: switch.tower_lamp
#- service: notify.notify
# data:
# message: "Outside lights are on!"

View File

@ -0,0 +1,20 @@
sequence:
- event: LOGBOOK_ENTRY
event_data:
name: EVENT
message: "Turning outside lights on."
- service: switch.turn_on
data:
entity_id: switch.driveway_light
- service: switch.turn_on
data:
entity_id: switch.side_door_light
- service: switch.turn_on
data:
entity_id: front_porch_left
- service: switch.turn_on
data:
entity_id: front_porch_right
#- service: notify.notify
# data:
# message: "Outside lights are on!"