core: scene.create snapshot_entities does not respect colour temperature for mqtt lights
A script runs stuff and is supposed to restore the state. Applied to a Zigbee light group.
library_flash:
alias: "Library: flash"
mode: single
sequence:
- service: scene.create
data:
scene_id: before
snapshot_entities:
- light.library
- repeat:
count: 3
sequence:
...
- service: scene.turn_on
data:
entity_id: scene.before
transition: 5
Restores brightness, but not colour temperature. The same script restored all fine when the light was controlled by Hue Bridge. Manual control of the light group, as well as the light bulb directly, works well, with all properties respected.
Environment
HA 2021.1.1. Zigbee2MQTT, Mosquito 2.0.4. Hue White Ambience E27 light.
Problem-relevant configuration.yaml
...
light:
- platform: mqtt
schema: json
name: Library
command_topic: "zigbee/lights_library/set"
state_topic: "zigbee/lights_library"
color_temp: true
brightness: true
rgb: true
Traceback/Error logs
Additional information
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 37 (27 by maintainers)
@kevincaradant #45522 makes it possible for zigbee2mqtt to make the color mode of the light clear when it reports the state. However, zigbee2mqtt also needs to be updated.
@Koenkk Please have a look at the changes in #45522, this will allow setting the light’s color mode to white or color by setting
color
orcolor_temperature
tonull
in the state update map.Please note that it’s not intended to try to translate the
color_temperature
to acolor
, Home Assistant expects the light be be either in color or in white mode, although this is not currently enforced when updating the entity’s state.@kevincaradant Thanks for the log! The reason it doesn’t work is precisely that both (a not exactly valid) xy-color and a color temperature is stored in the scene. When the states are restored, only the xy-color is sent to the light.