mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-29 01:13:53 +00:00
You can find the entire repo here.
This commit is contained in:
32
config/automation/upstairs_motion_ifttt.yaml
Executable file
32
config/automation/upstairs_motion_ifttt.yaml
Executable file
@@ -0,0 +1,32 @@
|
||||
# Uses the Nest thermostat to turn on lights and turn them off upstairs.
|
||||
|
||||
- alias: 'Upstairs Light Turn on'
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: upstairs_light_on
|
||||
- platform: state
|
||||
entity_id: binary_sensor.upstairs_away_mode
|
||||
to: 'False'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
- condition: time
|
||||
before: '23:45'
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: group.upstairs
|
||||
|
||||
- alias: 'Upstairs Light Turn off'
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: upstairs_light_off
|
||||
- platform: state
|
||||
entity_id: binary_sensor.upstairs_away_mode
|
||||
to: 'True'
|
||||
|
||||
action:
|
||||
service: light.turn_off
|
||||
entity_id: group.upstairs
|
Reference in New Issue
Block a user