diff --git a/homeassistant/components/tellstick/light.py b/homeassistant/components/tellstick/light.py index 5ead1bf6bda..893e67c897d 100644 --- a/homeassistant/components/tellstick/light.py +++ b/homeassistant/components/tellstick/light.py @@ -3,7 +3,7 @@ from __future__ import annotations from homeassistant.components.light import ( ATTR_BRIGHTNESS, - SUPPORT_BRIGHTNESS, + COLOR_MODE_BRIGHTNESS, LightEntity, ) from homeassistant.core import HomeAssistant @@ -18,8 +18,6 @@ from . import ( TellstickDevice, ) -SUPPORT_TELLSTICK = SUPPORT_BRIGHTNESS - def setup_platform( hass: HomeAssistant, @@ -47,6 +45,9 @@ def setup_platform( class TellstickLight(TellstickDevice, LightEntity): """Representation of a Tellstick light.""" + _attr_color_mode = COLOR_MODE_BRIGHTNESS + _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + def __init__(self, tellcore_device, signal_repetitions): """Initialize the Tellstick light.""" super().__init__(tellcore_device, signal_repetitions) @@ -58,11 +59,6 @@ class TellstickLight(TellstickDevice, LightEntity): """Return the brightness of this light between 0..255.""" return self._brightness - @property - def supported_features(self): - """Flag supported features.""" - return SUPPORT_TELLSTICK - def _parse_ha_data(self, kwargs): """Turn the value from HA into something useful.""" return kwargs.get(ATTR_BRIGHTNESS)