Home-AssistantConfig/config/automation/upstairs_motion_ifttt.yaml

46 lines
1.2 KiB
YAML
Raw Normal View History

#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Lighitng based on Nest Away status
#-------------------------------------------
# Nest ThermoStat https://amzn.to/2eAhB1k
2018-01-02 00:00:45 +00:00
# Uses the Nest thermostat to turn on lights and turn them off upstairs.
- alias: 'Upstairs Light Turn on'
2020-07-20 18:33:03 +00:00
id: 439fc892-74ef-42b3-9d53-9474b9b9ae11
2018-01-02 00:00:45 +00:00
trigger:
- platform: event
event_type: upstairs_light_on
- platform: state
entity_id: binary_sensor.upstairs_nest_away
to: 'off'
2018-01-02 00:00:45 +00:00
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: time
before: '23:45'
action:
- service: light.turn_on
entity_id: light.upstairs_lights
2018-01-02 00:00:45 +00:00
- alias: 'Upstairs Light Turn off'
2020-07-20 18:33:03 +00:00
id: ee50f882-94b7-4cfc-bc2e-4a3e07ae08a8
2018-01-02 00:00:45 +00:00
trigger:
- platform: event
event_type: upstairs_light_off
- platform: state
entity_id: binary_sensor.upstairs_nest_away
to: 'on'
2018-01-02 00:00:45 +00:00
- platform: state
entity_id: light.upstairs_lights
to: 'on'
for: '02:00:00'
2018-01-02 00:00:45 +00:00
action:
service: light.turn_off
entity_id: light.upstairs_lights