From 95f0d14f089e90fbbd08bb6b14f71520d6a82fa4 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 22:01:35 +0200 Subject: [PATCH] Use ColorMode enum in velbus (#70550) --- homeassistant/components/velbus/light.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/velbus/light.py b/homeassistant/components/velbus/light.py index 1fcb23e7485..7a8526e0b67 100644 --- a/homeassistant/components/velbus/light.py +++ b/homeassistant/components/velbus/light.py @@ -13,12 +13,11 @@ from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_FLASH, ATTR_TRANSITION, - COLOR_MODE_BRIGHTNESS, - COLOR_MODE_ONOFF, FLASH_LONG, FLASH_SHORT, SUPPORT_FLASH, SUPPORT_TRANSITION, + ColorMode, LightEntity, ) from homeassistant.config_entries import ConfigEntry @@ -50,8 +49,8 @@ class VelbusLight(VelbusEntity, LightEntity): """Representation of a Velbus light.""" _channel: VelbusDimmer - _attr_color_mode = COLOR_MODE_BRIGHTNESS - _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + _attr_color_mode = ColorMode.BRIGHTNESS + _attr_supported_color_modes = {ColorMode.BRIGHTNESS} _attr_supported_features = SUPPORT_TRANSITION @property @@ -100,8 +99,8 @@ class VelbusButtonLight(VelbusEntity, LightEntity): _channel: VelbusButton _attr_entity_registry_enabled_default = False _attr_entity_category = EntityCategory.CONFIG - _attr_color_mode = COLOR_MODE_ONOFF - _attr_supported_color_modes = {COLOR_MODE_ONOFF} + _attr_color_mode = ColorMode.ONOFF + _attr_supported_color_modes = {ColorMode.ONOFF} _attr_supported_features = SUPPORT_FLASH def __init__(self, channel: VelbusChannel) -> None: