mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix processing supported color modes for emulated_hue (#108803)
This commit is contained in:
parent
066692506c
commit
134cc78400
@ -386,7 +386,7 @@ class HueOneLightChangeView(HomeAssistantView):
|
|||||||
# Get the entity's supported features
|
# Get the entity's supported features
|
||||||
entity_features = entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
|
entity_features = entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)
|
||||||
if entity.domain == light.DOMAIN:
|
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
|
# Parse the request
|
||||||
parsed: dict[str, Any] = {
|
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]:
|
def state_to_json(config: Config, state: State) -> dict[str, Any]:
|
||||||
"""Convert an entity to its Hue bridge JSON representation."""
|
"""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)
|
unique_id = _entity_unique_id(state.entity_id)
|
||||||
state_dict = get_entity_state_dict(config, state)
|
state_dict = get_entity_state_dict(config, state)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user