From bac69d9e75bc31d0e461226f25762ae43bae1c7d Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 26 Apr 2022 14:33:12 +0200 Subject: [PATCH] Use light enums in velbus (#70784) --- homeassistant/components/velbus/light.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/velbus/light.py b/homeassistant/components/velbus/light.py index 7a8526e0b67..f562e250892 100644 --- a/homeassistant/components/velbus/light.py +++ b/homeassistant/components/velbus/light.py @@ -15,10 +15,9 @@ from homeassistant.components.light import ( ATTR_TRANSITION, FLASH_LONG, FLASH_SHORT, - SUPPORT_FLASH, - SUPPORT_TRANSITION, ColorMode, LightEntity, + LightEntityFeature, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant @@ -51,7 +50,7 @@ class VelbusLight(VelbusEntity, LightEntity): _channel: VelbusDimmer _attr_color_mode = ColorMode.BRIGHTNESS _attr_supported_color_modes = {ColorMode.BRIGHTNESS} - _attr_supported_features = SUPPORT_TRANSITION + _attr_supported_features = LightEntityFeature.TRANSITION @property def is_on(self) -> bool: @@ -101,7 +100,7 @@ class VelbusButtonLight(VelbusEntity, LightEntity): _attr_entity_category = EntityCategory.CONFIG _attr_color_mode = ColorMode.ONOFF _attr_supported_color_modes = {ColorMode.ONOFF} - _attr_supported_features = SUPPORT_FLASH + _attr_supported_features = LightEntityFeature.FLASH def __init__(self, channel: VelbusChannel) -> None: """Initialize the button light (led)."""