#How to snapshot lights that are changing colors, run a task, then revert back to that dynamic scene?

1 messages · Page 1 of 1 (latest)

tropic loom
#

Hi,

New to Home Assistant and learning. I've got a few Hue bulbs, a bridge and a Hue dimmer switch.

With the dimmer I'm trying to program it so that when the battery is below a certain level it will cause the lights to flash red a couple times and then revert back to whatever the lights were doing before hand.

I've managed to get it to almost work. If the lights are static then the automation runs and reverts back to the static colour (in my case a scene) just fine.

But if the bulbs are running an effect, like Prism, then when I run the automation it doesn't revert back to that properly. Instead it seems to go back to a static colour.

So I'm wondering if anyone knows a way to make this work?

Here are my current yamls:
Yaml to snapshot the current scene

action: scene.create
data:
  scene_id: lights_before
  snapshot_entities: light.andys_office
alias: Scene Create Snapshot of Current Scene
enabled: true

Yaml to revert back to that snapshotted scene

action: scene.turn_on
target:
  entity_id: scene.lights_before
alias: Scene Revert to Snapshot - action
data: {}

And the yaml to delete the snapshotted scene

action: scene.delete
metadata: {}
target:
  entity_id: scene.lights_before
data: {}

I've also attached my "do" section. The "Unknown entity" errors go away as the temporary scene is snapshotted.