I am trying to set up a part of a script which uses a lamp as an indicator but saving it’s previous setting, changing it briefly to a different colour and then changing back. I’m trying to do this by creating a scene, changing the settings, then activating the original scene.
I am doing this without any problem elsewhere to temporarily increase brightness on some other lamps.
For some reason, this version will not work. The scene is created and I don’t get an error when I activate it. However, the lamp stays stuck in the modified setting.
- service: scene.create
data:
scene_id: ceiling4_before
snapshot_entities:
- light.ceiling_4_local
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 255
- 0
brightness: 10
target:
entity_id: light.ceiling_4_local
continue_on_error: true
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- service: scene.turn_on
target:
entity_id: scene.ceiling4_before
data: {}
I assume that it’s some sort of timing problem? Do I need to add a delay when the scene is created, perhaps? I’ve tried running each step in the script manually to simulate this and each runs successfully, but the overall functionality isn’t there.