2020-11-03 23:55:41 +00:00
|
|
|
{% for light in lights %}
|
|
|
|
# {{ light.name }}
|
|
|
|
- id: sleep_on_{{ light.entityId }}
|
|
|
|
alias: '[Sleep-On] {{ light.name }}'
|
|
|
|
trigger:
|
|
|
|
- platform: time
|
|
|
|
at: input_datetime.sleep_mode
|
2022-05-17 17:01:31 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id:
|
|
|
|
- group.guests
|
|
|
|
to: not_home
|
2020-11-08 14:55:26 +00:00
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: {{ light.entityId }}
|
|
|
|
state: 'on'
|
2022-05-17 17:01:31 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: group.guests
|
|
|
|
state: not_home
|
|
|
|
- condition: time
|
|
|
|
before: input_datetime.day_mode
|
|
|
|
after: input_datetime.sleep_mode
|
2020-11-03 23:55:41 +00:00
|
|
|
action:
|
|
|
|
- service: light.turn_on
|
|
|
|
data:
|
|
|
|
kelvin: 2000
|
|
|
|
entity_id: {{ light.entityId }}
|
|
|
|
mode: single
|
|
|
|
{% endfor %}
|