Fix light color mode in advantage_air (#108875)

This commit is contained in:
Erik Montnemery 2024-01-26 18:22:49 +01:00 committed by GitHub
parent 7bec5ef6bc
commit b074334c07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,7 +83,8 @@ class AdvantageAirLight(AdvantageAirEntity, LightEntity):
class AdvantageAirLightDimmable(AdvantageAirLight):
"""Representation of Advantage Air Dimmable Light."""
_attr_supported_color_modes = {ColorMode.ONOFF, ColorMode.BRIGHTNESS}
_attr_color_mode = ColorMode.BRIGHTNESS
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
def __init__(self, instance: AdvantageAirData, light: dict[str, Any]) -> None:
"""Initialize an Advantage Air Dimmable Light."""
@ -107,13 +108,15 @@ class AdvantageAirLightDimmable(AdvantageAirLight):
class AdvantageAirThingLight(AdvantageAirThingEntity, LightEntity):
"""Representation of Advantage Air Light controlled by myThings."""
_attr_color_mode = ColorMode.ONOFF
_attr_supported_color_modes = {ColorMode.ONOFF}
class AdvantageAirThingLightDimmable(AdvantageAirThingEntity, LightEntity):
"""Representation of Advantage Air Dimmable Light controlled by myThings."""
_attr_supported_color_modes = {ColorMode.ONOFF, ColorMode.BRIGHTNESS}
_attr_color_mode = ColorMode.BRIGHTNESS
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
@property
def brightness(self) -> int: