Have set up the following sensor. Now it is 0:14 and i still see Day as the sensor state. Where could i have gone wrong?
- platform: template
sensors:
day_night:
friendly_name: 'День и ночь'
value_template: >-
{%- if now().hour > 20 and now().hour < 24 %}
Evening
{% elif now().hour > 0 and now().hour < 7 %}
Night
{% else %}
Day
{%- endif %}