From d33fbbfb6da55848f8af766c99e3de1e8ad08baf Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 7 Apr 2022 09:40:17 +0200 Subject: [PATCH] Migrate tellduslive light to color_mode (#69522) --- homeassistant/components/tellduslive/light.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/tellduslive/light.py b/homeassistant/components/tellduslive/light.py index a3965f520d5..a0721a21c20 100644 --- a/homeassistant/components/tellduslive/light.py +++ b/homeassistant/components/tellduslive/light.py @@ -4,7 +4,7 @@ import logging from homeassistant.components import light, tellduslive from homeassistant.components.light import ( ATTR_BRIGHTNESS, - SUPPORT_BRIGHTNESS, + COLOR_MODE_BRIGHTNESS, LightEntity, ) from homeassistant.config_entries import ConfigEntry @@ -39,6 +39,9 @@ async def async_setup_entry( class TelldusLiveLight(TelldusLiveEntity, LightEntity): """Representation of a Tellstick Net light.""" + _attr_color_mode = COLOR_MODE_BRIGHTNESS + _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + def __init__(self, client, device_id): """Initialize the Tellstick Net light.""" super().__init__(client, device_id) @@ -54,11 +57,6 @@ class TelldusLiveLight(TelldusLiveEntity, LightEntity): """Return the brightness of this light between 0..255.""" return self.device.dim_level - @property - def supported_features(self): - """Flag supported features.""" - return SUPPORT_BRIGHTNESS - @property def is_on(self): """Return true if light is on."""