Fix color_mode property in fritzbox light (#70965)

This commit is contained in:
Erik Montnemery 2022-04-28 09:36:14 +02:00 committed by GitHub
parent db3eb26c74
commit 13d67747cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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