diff --git a/homeassistant/components/x10/light.py b/homeassistant/components/x10/light.py index 0676b249e1b..f007b799bf6 100644 --- a/homeassistant/components/x10/light.py +++ b/homeassistant/components/x10/light.py @@ -8,8 +8,8 @@ import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, + COLOR_MODE_BRIGHTNESS, PLATFORM_SCHEMA, - SUPPORT_BRIGHTNESS, LightEntity, ) from homeassistant.const import CONF_DEVICES, CONF_ID, CONF_NAME @@ -20,8 +20,6 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType _LOGGER = logging.getLogger(__name__) -SUPPORT_X10 = SUPPORT_BRIGHTNESS - PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { vol.Required(CONF_DEVICES): vol.All( @@ -63,6 +61,9 @@ def setup_platform( class X10Light(LightEntity): """Representation of an X10 Light.""" + _attr_color_mode = COLOR_MODE_BRIGHTNESS + _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + def __init__(self, light, is_cm11a): """Initialize an X10 Light.""" self._name = light["name"] @@ -86,11 +87,6 @@ class X10Light(LightEntity): """Return true if light is on.""" return self._state - @property - def supported_features(self): - """Flag supported features.""" - return SUPPORT_X10 - def turn_on(self, **kwargs): """Instruct the light to turn on.""" if self._is_cm11a: