Closed Norien closed 7 years ago
This should take care of it, I can add extra lights down the road easy!
- alias: 'theme_light_auto_off'
initial_state: 'on'
trigger:
- platform: template
value_template: "{% if is_state('light.front_door', 'on') %}true{% endif %}"
condition:
- condition: state
entity_id: 'sun.sun'
state: 'above_horizon'
action:
- service: light.turn_off
data:
entity_id: light.front_door
Never allow outdoor lights on when sun is out