I have an automation which sets my ceiling light to moonlight between 10pm and 7am when they are turned on.
- alias: Deckenlampe Diele Normal/Mondlicht
trigger:
platform: state
entity_id: light.deckenleuchte_diele
to: on
action:
service: light.yeelight_set_mode
data_template:
entity_id: light.deckenleuchte_diele
mode : >
{% if now().hour >= 22 %}
moonlight
{% elifif now().hour <= 7 %}
moonlight
{% else %}
normal
{% endif %}
But I would like to do this after 10:30pm and before 07:30pm. Anyone has an idea?
Thanks!