2020-08-20 19:30:18 +00:00
|
|
|
#-------------------------------------------
|
|
|
|
# @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
|
2020-06-21 17:43:35 +00:00
|
|
|
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
|
2020-06-07 20:06:43 +00:00
|
|
|
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
|
2020-06-21 17:43:35 +00:00
|
|
|
entity_id: binary_sensor.upstairs_nest_away
|
|
|
|
to: 'on'
|
2018-01-02 00:00:45 +00:00
|
|
|
|
2020-08-20 19:30:18 +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
|
2020-06-07 20:06:43 +00:00
|
|
|
entity_id: light.upstairs_lights
|