From b074334c073448f9cb0b90193e4dffbef22ae3b1 Mon Sep 17 00:00:00 2001 From: Erik Montnemery <erik@montnemery.com> Date: Fri, 26 Jan 2024 18:22:49 +0100 Subject: [PATCH] Fix light color mode in advantage_air (#108875) --- homeassistant/components/advantage_air/light.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/advantage_air/light.py b/homeassistant/components/advantage_air/light.py index 0ee91c6fcbc..47c8c7c1768 100644 --- a/homeassistant/components/advantage_air/light.py +++ b/homeassistant/components/advantage_air/light.py @@ -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: -- GitLab