RR
Size: a a a
RR
Р
SK
RR
Р
RR
Р
- service: light.turn_on
entity_id: light.kitchen_light
data_template:
kelvin: 3500
brightness_pct: 100
RR
- service: light.turn_on
entity_id: light.kitchen_light
data_template:
kelvin: 3500
brightness_pct: 100
color_temp_pct: >
{% set hour=states("sensor.time").split(':')[0] | int %}
{%- if hour >= 0 and hour < 6 -%}
370
{%- elif hour >= 6 and hour < 8 -%}
300
{%- elif hour >= 8 and hour < 20 -%}
200
{%- elif hour >= 20 and hour < 23 -%}
250
{%- elif hour >= 23 and hour < 24 -%}
340
{% endif %}
RR
SK
Р
Р
color_temp_pct: >
{% set hour=states("sensor.time").split(':')[0] | int %}
{%- if hour >= 0 and hour < 6 -%}
370
{%- elif hour >= 6 and hour < 8 -%}
300
{%- elif hour >= 8 and hour < 20 -%}
200
{%- elif hour >= 20 and hour < 23 -%}
250
{%- elif hour >= 23 and hour < 24 -%}
340
{% endif %}
SK
RR
RR
color_temp_pct: >
{% set hour=states("sensor.time").split(':')[0] | int %}
{%- if hour >= 0 and hour < 6 -%}
370
{%- elif hour >= 6 and hour < 8 -%}
300
{%- elif hour >= 8 and hour < 20 -%}
200
{%- elif hour >= 20 and hour < 23 -%}
250
{%- elif hour >= 23 and hour < 24 -%}
340
{% endif %}
RR
RR
RR
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}
G
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