Home-AssistantConfig/automation/upstairs_motion_ifttt.yaml

32 lines
776 B
YAML
Raw Normal View History

2016-10-13 16:07:27 +00:00
# Uses the Nest thermostat to turn on lights and turn them off upstairs.
2016-10-12 00:45:09 +00:00
- alias: 'Upstairs Light Turn on'
2016-10-12 00:45:09 +00:00
trigger:
- platform: event
event_type: upstairs_light_on
2016-10-13 16:07:27 +00:00
- platform: state
entity_id: binary_sensor.upstairs_away_mode
to: 'off'
2016-10-12 00:45:09 +00:00
condition:
2016-10-13 16:07:27 +00:00
- condition: state
2016-10-12 16:28:11 +00:00
entity_id: sun.sun
state: 'below_horizon'
2016-10-13 16:07:27 +00:00
- condition: time
before: '23:45'
2016-10-12 00:45:09 +00:00
action:
service: light.turn_on
entity_id: group.upstairs
- alias: 'Upstairs Light Turn off'
trigger:
- platform: event
event_type: upstairs_light_off
2016-10-13 16:07:27 +00:00
- platform: state
entity_id: binary_sensor.upstairs_away_mode
to: 'on'
action:
service: light.turn_off
entity_id: group.upstairs