Scenes not properly saving color state

Where is the editor?

Edit: Actually just ran an update on my container in unRAID and things seem to be working again after an update on my end.

1 Like

To give you something on top:

I have an automation where a light scene is being generated dynamically as soon as someone hits the main door ring bell.
This scene is taking a snapshot of the Hue light bulbs current state. After the scene is being created, the lights start to blink by using the “breathe” effect. After blinking the lights should get into their previous state at the moment when the snapshot was taken.

The idea behind this is that the Hue lights should singalize optically whenever someone is ringing the main door bell because there are some areas in our house where you just cannot hear the main door ring bell.

The automation works but the limitation here is that when the scene is being activated the color and brightness do not match the previous state, which is driving me crazy since months now.

Any ideas on how to solve/workaround this issue are more than welcome.

alias: ScriptLightNotifications
sequence:
  - action: scene.create
    data:
      scene_id: scene_scriptlightnotifications_lights_previous_state
      snapshot_entities:
        - light.huecolorlightstripplus02
        - light.huecolorlightstripplus03
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - action: mqtt.publish
    data:
      qos: 0
      retain: false
      topic: zigbee2mqtt/Z2MGroup_huecolorlightstripsplus/set
      payload: "{\"scene_recall\": 1, \"effect\": \"breathe\"}"
  - delay:
      hours: 0
      minutes: 0
      seconds: 8
      milliseconds: 0
  - action: scene.turn_on
    data: {}
    target:
      entity_id: scene.scene_scriptlightnotifications_lights_previous_state
mode: single
1 Like

Yup… I have also been encountering this issue… it does seem like a pretty big bug… and it’s not specific to Hue like the issue keeps pointing at.

Had the same issue and now works once I’ve installed the latest updates.

Currently on:
Core 2024.10.4
Supervisor 2024.10.3
Operating System 13.2
Frontend 20241002.4

A workaround I have found to work reasonably well:

Previous automation:

  • trigger
  • create scene/snapshot of lights
  • using light colors as notifications
  • restore previously saved scene
    Issue:
  • if lights are turned off before the automation triggers
  • lights will have color of notification, as scenes/snapshot don’t save color when light is off

Workaround:

  • create button-helper
  • add it to a panel (I chose a small button with “mdi:content-save” icon next to lighting control)
  • add automation, that if button-helper changes state. Saves the current lighting config/creates snapshot (name: last-lighting-state)

New automation:

  • trigger
  • if lights are off:
    • flash the lights in desired color
    • activate scene “last-lighting-state”
    • turn all lights used off
  • if lights are on:
    • flash the lights in desired color
    • activate scene “last-lighting-state”

Issues:

  • lights that where off before the notification are now on in the color of “last-lighting-state”

Ideally the last lighting state would be saved when color changes by anything except automations (changes through panel, buttons etc).
Notification automation would check each on or off state of lights separately. And apply “last-lighting-state” then turn on/off each light according to the state checked before.
But I haven’t found a fairly easy way to do that yet.
But got some ideas that I will try.

With this its at least usable for me, as when a automation has triggered when I wasn’t home. Return home and turn on lights, it wont have the color of the notifications any longer.