1
0
ansible-home-assistant/templates/lights.yaml.j2

21 lines
450 B
Django/Jinja

{% for light in lights %}
# {{ light.name }}
- id: sleep_on_{{ light.entityId }}
alias: '[Sleep-On] {{ light.name }}'
trigger:
- platform: state
entity_id:
- input_boolean.sleep_mode
to: 'on'
condition:
- condition: state
entity_id: {{ light.entityId }}
state: 'on'
action:
- service: light.turn_on
data:
kelvin: 2000
entity_id: {{ light.entityId }}
mode: single
{% endfor %}