Fix processing supported color modes for emulated_hue (#108803)
This commit is contained in:
parent
066692506c
commit
134cc78400
1 changed files with 2 additions and 2 deletions
|
@ -386,7 +386,7 @@ class HueOneLightChangeView(HomeAssistantView):
|
|||
# Get the entity's supported features
|
||||
entity_features = entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
|
||||
if entity.domain == light.DOMAIN:
|
||||
color_modes = entity.attributes.get(light.ATTR_SUPPORTED_COLOR_MODES, [])
|
||||
color_modes = entity.attributes.get(light.ATTR_SUPPORTED_COLOR_MODES) or []
|
||||
|
||||
# Parse the request
|
||||
parsed: dict[str, Any] = {
|
||||
|
@ -765,7 +765,7 @@ def _entity_unique_id(entity_id: str) -> str:
|
|||
|
||||
def state_to_json(config: Config, state: State) -> dict[str, Any]:
|
||||
"""Convert an entity to its Hue bridge JSON representation."""
|
||||
color_modes = state.attributes.get(light.ATTR_SUPPORTED_COLOR_MODES, [])
|
||||
color_modes = state.attributes.get(light.ATTR_SUPPORTED_COLOR_MODES) or []
|
||||
unique_id = _entity_unique_id(state.entity_id)
|
||||
state_dict = get_entity_state_dict(config, state)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue