Hello!
I’m trying to automate some lighting scenes depending on the time of day. I managed to add 4 automations with time conditions, which seem to work fine. My problem is that when the lights are off and I switch them on, the lights go crazy and it seems that it’s going through all the different scenes I have set up. Can anyone help me maybe simplify the configuration or fix my issue?
Here’s the code:
scene:
- name: Late Evening
entities:
light.left_living_room_light:
state: on
brightness: 191
color_temp: 154
rgb_color: [255,140,33]
light.right_living_room_light:
state: on
brightness: 191
color_temp: 154
rgb_color: [255,140,33]
light.living_room_ceiling_light:
state: on
brightness: 51
color_temp: 447
rgb_color: [161,107,146]
light.bedroom_light:
state: on
brightness: 114
color_temp: 447
rgb_color: [19,180,255]
light.kitchen_light:
state: on
brightness: 206
color_temp: 443
rgb_color: [255,184,85]
- name: Evening
entities:
light.left_living_room_light:
state: on
brightness: 254
color_temp: 455
rgb_color: [255,183,84]
light.right_living_room_light:
state: on
brightness: 254
color_temp: 455
rgb_color: [255,183,84]
light.living_room_ceiling_light:
state: on
brightness: 77
color_temp: 447
rgb_color: [165,145,115]
light.bedroom_light:
state: on
brightness: 73
color_temp: 370
rgb_color: [160,141,112]
light.kitchen_light:
state: on
brightness: 254
color_temp: 376
rgb_color: [255,198,113]
- name: Daytime
entities:
group.home_lights:
state: on
brightness: 254
color_temp: 231
rgb_color: [255,231,192]
- name: Nightlights
entities:
group.sensor_lights:
state: on
brightness: 52
color_temp: 370
rgb_color: [113,26,14]
- alias: Nightlights
trigger:
- platform: state
entity_id: group.sensor_lights
state: 'on'
- platform: state
entity_id: group.sensor_lights
to: 'on'
condition:
condition: time
after: '00:00:00'
action:
service: scene.turn_on
entity_id: scene.nightlights
- alias: Day Scene
trigger:
- platform: state
entity_id: group.home_lights
state: 'on'
- platform: state
entity_id: group.home_lights
to: 'on'
condition:
condition: time
after: '07:00:00'
action:
service: scene.turn_on
entity_id: scene.daytime
- alias: Evening Scene
trigger:
- platform: state
entity_id: group.home_lights
state: 'on'
- platform: state
entity_id: group.home_lights
to: 'on'
condition:
condition: time
after: '17:00:00'
action:
service: scene.turn_on
entity_id: scene.evening
- alias: Late Evening Scene
trigger:
- platform: state
entity_id: group.home_lights
state: 'on'
- platform: state
entity_id: group.home_lights
to: 'on'
condition:
condition: time
after: '20:00:00'
action:
service: scene.turn_on
entity_id: scene.late_evening
Any help would be greatly appreciated!