From 13d67747cb76fca5429a3eced78f171bd127ab07 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 28 Apr 2022 09:36:14 +0200 Subject: [PATCH] Fix color_mode property in fritzbox light (#70965) --- homeassistant/components/fritzbox/light.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/fritzbox/light.py b/homeassistant/components/fritzbox/light.py index 65ed96dd603..0edcb8ee260 100644 --- a/homeassistant/components/fritzbox/light.py +++ b/homeassistant/components/fritzbox/light.py @@ -118,7 +118,14 @@ class FritzboxLight(FritzBoxEntity, LightEntity): return color.color_temperature_kelvin_to_mired(kelvin) @property - def supported_color_modes(self) -> set: + def color_mode(self) -> ColorMode: + """Return the color mode of the light.""" + if self.device.color_mode == COLOR_MODE: + return ColorMode.HS + return ColorMode.COLOR_TEMP + + @property + def supported_color_modes(self) -> set[ColorMode]: """Flag supported color modes.""" return SUPPORTED_COLOR_MODES