Open Airblader opened 1 month ago
Hey there @balloob, @marcelveldt, mind taking a look at this issue as it has been labeled with an integration (hue
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
hue documentation hue source (message by IssueLinks)
Same problem here.
If you want to have different colors in a scene, you need the individual lights in the scene and not the group.
Is that a hard limitation, or just a feature request rather than a bug?
Here is my specific example which is facing the issue:
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 starts to blink using the “breathe” effect (which is done via mqtt.publish
action). After blinking the lights should get into their previous state at the moment when the snapshot was taken.
(Just for explanation: 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.)
As suggested by @marcelveldt, for taking the dynamic scene snapshot, I use the individual lights instead of the group, but this does not solve the issue I am facing. The automation works so far but the ugly limitation here is that when the scene is being activated at the last step of the automation, the color and brightness do not match the previous state.
Here's the code of the script which is being triggered by the automation after someone hits the main door ring bell:
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
This is my scene.yaml
- id: '1728732702977'
name: Flur Hell
entities:
light.flur_gruppe:
brightness: 255
color_temp_kelvin: 2700
state: 'on'
The brightness change as expected. But the color_temp is not set.
The attributes of this group
min_color_temp_kelvin: 2202
max_color_temp_kelvin: 6535
min_mireds: 153
max_mireds: 454
effect_list: blink, breathe, candle, channel_change, finish_effect, okay, stop_effect, stop_hue_effect
supported_color_modes: color_temp
effect: null
color_mode: color_temp
brightness: 150
color_temp_kelvin: 3649
color_temp: 274
hs_color: 27.037, 41.629
rgb_color: 255, 196, 148
xy_color: 0.444, 0.371
entity_id: light.hue_flur_1, light.hue_flur_2, light.hue_flur_3
icon: mdi:lightbulb-group
friendly_name: Flur Gruppe
supported_features: 44
Setting the color_temp_kelvin to 2700 manual works fine. But when turn_on scene the color_temp_kelvin is set 3649
The problem
This is a follow-up for #122165 which has been fixed & closed, but I think something is still not working correctly.
I have an automation that creates a scene using a snapshot, dims the lights, and reactivates the scene later on (to dim the lights while the balcony door is open). In my specific case, they are all Hue lights.
When I create the scene as a snapshot of a light group (with each light having a different color), activating the scene turns on the lights, but sets them all to the same (white, for me) color instead of the correct individual settings.
If, however, I create the scene specifying the individual lights rather than a light group, everything works correctly.
I am attaching an automation that I can trigger manually to reliably reproduce the issue.
What version of Home Assistant Core has the issue?
core-2024.9.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Philips Hue
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hue/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response