From 643d04a7176858e36e4c899d03d825589d7ec793 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 07:49:39 +0200 Subject: [PATCH] Use ColorMode enum in blebox (#70426) --- homeassistant/components/blebox/light.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/blebox/light.py b/homeassistant/components/blebox/light.py index 48e8ec3f4bb7..a582fe133c1c 100644 --- a/homeassistant/components/blebox/light.py +++ b/homeassistant/components/blebox/light.py @@ -6,9 +6,7 @@ from blebox_uniapi.error import BadOnValueError from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_RGBW_COLOR, - COLOR_MODE_BRIGHTNESS, - COLOR_MODE_ONOFF, - COLOR_MODE_RGBW, + ColorMode, LightEntity, ) from homeassistant.config_entries import ConfigEntry @@ -55,10 +53,10 @@ class BleBoxLightEntity(BleBoxEntity, LightEntity): def color_mode(self): """Return the color mode.""" if self._feature.supports_white and self._feature.supports_color: - return COLOR_MODE_RGBW + return ColorMode.RGBW if self._feature.supports_brightness: - return COLOR_MODE_BRIGHTNESS - return COLOR_MODE_ONOFF + return ColorMode.BRIGHTNESS + return ColorMode.ONOFF @property def rgbw_color(self):