mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Fix light color mode in fritzbox (#108758)
This commit is contained in:
@@ -91,9 +91,13 @@ class FritzboxLight(FritzBoxDeviceEntity, LightEntity):
|
|||||||
@property
|
@property
|
||||||
def color_mode(self) -> ColorMode:
|
def color_mode(self) -> ColorMode:
|
||||||
"""Return the color mode of the light."""
|
"""Return the color mode of the light."""
|
||||||
if self.data.color_mode == COLOR_MODE:
|
if self.data.has_color:
|
||||||
return ColorMode.HS
|
if self.data.color_mode == COLOR_MODE:
|
||||||
return ColorMode.COLOR_TEMP
|
return ColorMode.HS
|
||||||
|
return ColorMode.COLOR_TEMP
|
||||||
|
if self.data.has_level:
|
||||||
|
return ColorMode.BRIGHTNESS
|
||||||
|
return ColorMode.ONOFF
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_color_modes(self) -> set[ColorMode]:
|
def supported_color_modes(self) -> set[ColorMode]:
|
||||||
|
Reference in New Issue
Block a user