diff --git a/homeassistant/components/hue/v2/light.py b/homeassistant/components/hue/v2/light.py index 348d60d8de2..32a9832f69b 100644 --- a/homeassistant/components/hue/v2/light.py +++ b/homeassistant/components/hue/v2/light.py @@ -94,6 +94,9 @@ class HueLight(HueBaseEntity, LightEntity): self._supported_color_modes.add(ColorMode.BRIGHTNESS) # support transition if brightness control self._attr_supported_features |= LightEntityFeature.TRANSITION + if len(self._supported_color_modes) == 0: + # only add onoff colormode as fallback + self._supported_color_modes.add(ColorMode.ONOFF) self._last_brightness: float | None = None self._color_temp_active: bool = False # get list of supported effects (combine effects and timed_effects) diff --git a/tests/components/hue/test_light_v2.py b/tests/components/hue/test_light_v2.py index 55b0c194781..0c79933a246 100644 --- a/tests/components/hue/test_light_v2.py +++ b/tests/components/hue/test_light_v2.py @@ -72,7 +72,7 @@ async def test_lights( assert light_4.attributes["friendly_name"] == "Hue on/off light" assert light_4.state == "off" assert light_4.attributes["mode"] == "normal" - assert light_4.attributes["supported_color_modes"] == [] + assert light_4.attributes["supported_color_modes"] == [ColorMode.ONOFF] async def test_light_turn_on_service(