mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-13 19:54:42 +00:00
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
automation:
|
|
- alias: Lighting · Adjust temperature on start
|
|
trigger:
|
|
platform: state
|
|
entity_id:
|
|
- light.living_room_main_lights
|
|
- light.master_bedroom_main_lights
|
|
to: "on"
|
|
action:
|
|
- service: light.turn_on
|
|
data_template:
|
|
entity_id: "{{ trigger.entity_id }}"
|
|
color_temp: >-
|
|
|
|
{% if is_state('sun.sun', 'above_horizon') %}
|
|
350
|
|
{% else %}
|
|
500
|
|
{% endif %}
|
|
|
|
- alias: Lighting · Master bedroom · Adjust temperature based on time
|
|
trigger:
|
|
platform: state
|
|
entity_id: sun.sun
|
|
condition:
|
|
condition: state
|
|
entity_id: light.master_bedroom_main_lights
|
|
state: "on"
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.master_bedroom_main_lights
|
|
data_template:
|
|
color_temp: >-
|
|
|
|
{% if is_state('sun.sun', 'above_horizon') %}
|
|
350
|
|
{% else %}
|
|
500
|
|
{% endif %}
|
|
|
|
- alias: Lighting · Living room · Adjust temperature based on time
|
|
trigger:
|
|
platform: state
|
|
entity_id: sun.sun
|
|
condition:
|
|
condition: state
|
|
entity_id: light.living_room_main_lights
|
|
state: "on"
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.living_room_main_lights
|
|
data_template:
|
|
color_temp: >-
|
|
|
|
{% if is_state('sun.sun', 'above_horizon') %}
|
|
350
|
|
{% else %}
|
|
500
|
|
{% endif %}
|