2016-11-24 00:54:19 +00:00
|
|
|
#####################################################################################
|
|
|
|
### If the Kitchen Lights go on for more than 10 minutes, turn off the accent lights
|
|
|
|
#####################################################################################
|
|
|
|
|
|
|
|
- alias: Kitchen lights on - Accent lights off
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: group.kitchen_lights
|
|
|
|
state: 'on'
|
|
|
|
for: '00:10:00'
|
|
|
|
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: switch.kitchen_accents
|
|
|
|
state: 'on'
|
|
|
|
|
|
|
|
action:
|
|
|
|
- service: switch.turn_off
|
|
|
|
entity_id: switch.kitchen_accents
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
- alias: Kitchen lights off - turn on Accent lights
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: group.kitchen_lights
|
|
|
|
state: 'off'
|
2016-12-02 02:58:27 +00:00
|
|
|
for: '00:05:00'
|
2016-11-24 00:54:19 +00:00
|
|
|
|
|
|
|
condition:
|
|
|
|
- condition: sun
|
|
|
|
after: 'sunset'
|
|
|
|
|
|
|
|
action:
|
|
|
|
- service: switch.turn_on
|
|
|
|
entity_id: switch.kitchen_accents
|