diff --git a/homeassistant/components/lcn/light.py b/homeassistant/components/lcn/light.py index 2f8ce94db2a..38480cc3124 100644 --- a/homeassistant/components/lcn/light.py +++ b/homeassistant/components/lcn/light.py @@ -9,9 +9,9 @@ from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_TRANSITION, DOMAIN as DOMAIN_LIGHT, - SUPPORT_TRANSITION, ColorMode, LightEntity, + LightEntityFeature, ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES @@ -64,7 +64,7 @@ async def async_setup_entry( class LcnOutputLight(LcnEntity, LightEntity): """Representation of a LCN light for output ports.""" - _attr_supported_features = SUPPORT_TRANSITION + _attr_supported_features = LightEntityFeature.TRANSITION def __init__( self, config: ConfigType, entry_id: str, device_connection: DeviceConnectionType diff --git a/tests/components/lcn/test_light.py b/tests/components/lcn/test_light.py index 3d9d999f0ec..c74ecd2beb9 100644 --- a/tests/components/lcn/test_light.py +++ b/tests/components/lcn/test_light.py @@ -10,10 +10,9 @@ from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_SUPPORTED_COLOR_MODES, ATTR_TRANSITION, - COLOR_MODE_BRIGHTNESS, - COLOR_MODE_ONOFF, DOMAIN as DOMAIN_LIGHT, - SUPPORT_TRANSITION, + ColorMode, + LightEntityFeature, ) from homeassistant.const import ( ATTR_ENTITY_ID, @@ -44,13 +43,13 @@ async def test_entity_state(hass, lcn_connection): """Test state of entity.""" state = hass.states.get("light.light_output1") assert state - assert state.attributes[ATTR_SUPPORTED_FEATURES] == SUPPORT_TRANSITION - assert state.attributes[ATTR_SUPPORTED_COLOR_MODES] == [COLOR_MODE_BRIGHTNESS] + assert state.attributes[ATTR_SUPPORTED_FEATURES] == LightEntityFeature.TRANSITION + assert state.attributes[ATTR_SUPPORTED_COLOR_MODES] == [ColorMode.BRIGHTNESS] state = hass.states.get("light.light_output2") assert state - assert state.attributes[ATTR_SUPPORTED_FEATURES] == SUPPORT_TRANSITION - assert state.attributes[ATTR_SUPPORTED_COLOR_MODES] == [COLOR_MODE_ONOFF] + assert state.attributes[ATTR_SUPPORTED_FEATURES] == LightEntityFeature.TRANSITION + assert state.attributes[ATTR_SUPPORTED_COLOR_MODES] == [ColorMode.ONOFF] async def test_entity_attributes(hass, entry, lcn_connection):