Hey,
I want my living room lights to flash red at midnight, and go back to their original state after the automation.
I followed the instructions given on the top comment at Return light to previous state after automation, where I create a scene first, then flash the lights and finally go back to the state I created at the beginning. However my automation flashes the lights red, but fails to return to the previous state.
I am adding my snippet below, can someone point out to my mistake please?
Thanks!
Edit: I should also mention that the scene I create here is accessible from the Scenes menu and when I execute it it exactly does what I intend it to do, so no issue with scene creation part I think.
- id: '2'
alias: Flash red lights at midnight
trigger:
- platform: time
at: '23:59'
condition: []
action:
- service: scene.create
data:
scene_id: lights_previous_state
snapshot_entities: 'light.salon_2_light,light.salon_1_light'
- service: light.turn_on
data:
entity_id: light.salon_1_light
brightness: 130
flash: long
rgb_color:
- 255
- 0
- 0
- service: light.turn_on
data:
entity_id: light.salon_2_light
brightness: 130
flash: long
rgb_color:
- 255
- 0
- 0
- service: scene.turn_on
data:
entity_id: scene.lights_previous_state