mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-09 10:14:41 +00:00
71 lines
2.0 KiB
YAML
71 lines
2.0 KiB
YAML
automation:
|
|
- alias: Lighting · Temperature · Adjust on start
|
|
mode: parallel
|
|
trigger:
|
|
platform: state
|
|
entity_id:
|
|
# If the lights are listed by groups, turning on 1 light always turns on the others in the group.
|
|
- light.light_lohas_1
|
|
- light.light_lohas_2
|
|
- light.light_lohas_3
|
|
- light.light_lohas_4
|
|
- light.light_le_1
|
|
- light.light_le_2
|
|
- light.light_le_3
|
|
- light.light_le_4
|
|
- light.osram_1
|
|
- light.osram_4
|
|
- light.osram_5
|
|
- light.light_lohas_6
|
|
- light.osram_2
|
|
- light.osram_3
|
|
- light.osram_6
|
|
- light.osram_7
|
|
- light.osram_8
|
|
- light.osram_9
|
|
to: "on"
|
|
action:
|
|
- service: light.turn_on
|
|
data_template:
|
|
entity_id: "{{ trigger.entity_id }}"
|
|
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
|
|
|
- alias: Lighting · Temperature · Adjust based on time
|
|
trigger:
|
|
platform: sun
|
|
event: sunset
|
|
action:
|
|
- service: light.turn_on
|
|
data_template:
|
|
entity_id:
|
|
- light.master_bedroom_main
|
|
- light.living_room_main
|
|
- light.kitchen
|
|
- light.hallway
|
|
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
|
|
- service: logbook.log
|
|
data_template:
|
|
name: "💡 Lighting Module · "
|
|
message: >-
|
|
Adjusting temperature - sun changed from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}
|
|
domain: light
|
|
|
|
# switch:
|
|
# - platform: flux
|
|
# disable_brightness_adjust: true
|
|
# lights:
|
|
# - light.living_room_main
|
|
# - light.master_bedroom_main
|
|
# - light.pc
|
|
|
|
# circadian_lighting:
|
|
|
|
# switch:
|
|
# - platform: circadian_lighting
|
|
# name: Circadian lights
|
|
# disable_brightness_adjust: true
|
|
# lights_ct:
|
|
# - light.master_bedroom_main
|
|
# - light.pc
|
|
# - light.living_room_main
|