G
Size: a a a
G
SK
RR
ДЦ
F
ДЦ
F
ДЦ
ДЦ
F
DD
ДЦ
ДЦ
DD
ДЦ
DD
Р
RR
A
action:
- service: light.turn_on
entity_id: light.yeelight_03_ceiling4
data_template:
brightness_pct: >
{% set hour=states("sensor.time").split(':')[0] | int %}
{%- if hour >= 0 and hour < 6 -%}
15
{%- elif hour >= 6 and hour < 8 -%}
75
{%- elif hour >= 8 and hour < 20 -%}
100
{%- elif hour >= 20 and hour < 23 -%}
75
{%- elif hour >= 23 and hour < 24 -%}
30
{% endif %}
color_temp: >
{color_temp set hour=states("sensor.time").split(':')[0] | int color_temp}
{color_temp- if hour >= 0 and hour < 6 -color_temp}
370
{color_temp- elif hour >= 6 and hour < 8 -color_temp}
300
{color_temp- elif hour >= 8 and hour < 20 -color_temp}
200
{color_temp- elif hour >= 20 and hour < 23 -color_temp}
250
{color_temp- elif hour >= 23 and hour < 24 -color_temp}
340
{color_temp endif color_temp}
RR