I think this is specific to the Hue Hub integration.
If I capture the set of 5 lights into a scene and then turn the lights off.
Then turn on the scene, the lights will not always reliably hit their original values.
If I repeat this experiment, they will maybe work correctly 2 out of 5 times.
I’ve tried disabling other integrations to no avail.
Has anyone else experience that?
This is specifically when the scene involves a cominbation of different RGB values and brightness.
Ditto. If I manually re-run the scene from the UI I might get another light to change but I agree it’s not a reliable way to restore lights after the scene was created. Tried turning on the scene twice in the same automation but still seeing some lights not change. May try putting in a second or two delay or look for another way to save then restore lights.
Details… Do this to save the state of a set of hue lights.
- action: scene.create
metadata: {}
data:
snapshot_entities:
- light.fr_fan_1
- light.fr_fan_2
- light.hue_color_lamp_1
- light.fr_left_rear
- light.fr_left_speaker
- light.fr_right_speaker
- light.fr_tv_left
- light.fr_tv_right
- light.fr_front_right
scene_id: famlit_b4_fade
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
One it’s triggered, I can see the scene created in lovelace. I let a different canned scene (nightlight) execute (it fades out over a few seconds) then activate this saved scene (famlit_b4_fade) manually and at most I get 8 of the 9 lights restored. Interestingly the light “light.hue_color_lamp_1” is not called that in the hue app yet the light that always fails to restore is not that one. Sometimes only one restores to the wrong state and other times multiple do. The short of it is, while there may be multiple problems, it’s clear what is saved when the scene is created is not valid. The light that is always wrong is updated, just not to what it should be. I added the delay after the create just to see if it helped but apparently not.
Thinking we should prob create a GitHub issue since this is a core integration
Been doing lots of tests with the yaml. What I just saw happening was interesting within a single automation.
- create the scene via snapshot.
- Put a delay in.
- turn on the same scene just created.
- Put a long delay in (30 seconds).
- Execute a canned scene.
Saw nothing wrong when the automation turned on the scene just created.
Next, manually execute the same created scene and this time all it did was change the intensity, not change the color. Otherwise said, the created scene “turned on” fine before executing the canned Philips Hue scene but failed to restore the colors on the manual execution from lovelace. Through various tests what I have found is turning on a dynamically created scene only restores the intensity, not the color.
My “solution”. Create a hue scene called “off” that has all the lights off but one. You cannot create a scene with all the lights off. For the single light on, set the dim to 1%. Then when it’s time to turn off the lights, create a dynamic scene to capture whatever state the lights are in then set the scene to off. Later, when the presents sensor detects motion, activate the created scene. I suggest activating it a couple times with a second or two delay as well because the lights won’t reliably restore and once that happens, your next create scene the next time it’s detected that no one is there will capture the undesired state.
That doesn’t work for me. No matter how many times I try to restore it isn’t reliable