diff --git a/homeassistant/components/firmata/light.py b/homeassistant/components/firmata/light.py index de511058114..bec61172486 100644 --- a/homeassistant/components/firmata/light.py +++ b/homeassistant/components/firmata/light.py @@ -5,7 +5,7 @@ import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS, - SUPPORT_BRIGHTNESS, + COLOR_MODE_BRIGHTNESS, LightEntity, ) from homeassistant.config_entries import ConfigEntry @@ -56,6 +56,9 @@ async def async_setup_entry( class FirmataLight(FirmataPinEntity, LightEntity): """Representation of a light on a Firmata board.""" + _attr_color_mode = COLOR_MODE_BRIGHTNESS + _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + def __init__( self, api: FirmataBoardPin, @@ -83,11 +86,6 @@ class FirmataLight(FirmataPinEntity, LightEntity): """Return the brightness of the light.""" return self._api.state - @property - def supported_features(self) -> int: - """Flag supported features.""" - return SUPPORT_BRIGHTNESS - async def async_turn_on(self, **kwargs) -> None: """Turn on light.""" level = kwargs.get(ATTR_BRIGHTNESS, self._last_on_level)