From 134cc7840039ff1ee750347fc26fba620d6ad6d4 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Wed, 24 Jan 2024 22:15:00 +0100 Subject: [PATCH] Fix processing supported color modes for emulated_hue (#108803) --- homeassistant/components/emulated_hue/hue_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/emulated_hue/hue_api.py b/homeassistant/components/emulated_hue/hue_api.py index 0730eced60c..94ac97b6b36 100644 --- a/homeassistant/components/emulated_hue/hue_api.py +++ b/homeassistant/components/emulated_hue/hue_api.py @@ -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)