From d4d64b914df3edf8cd7df28faed33032f57012a0 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:42:29 +0200 Subject: [PATCH] Use ColorMode enum in senseme (#70533) --- homeassistant/components/senseme/light.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/senseme/light.py b/homeassistant/components/senseme/light.py index 3036dc1d04d..f1150260f38 100644 --- a/homeassistant/components/senseme/light.py +++ b/homeassistant/components/senseme/light.py @@ -9,8 +9,7 @@ from homeassistant import config_entries from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, - COLOR_MODE_BRIGHTNESS, - COLOR_MODE_COLOR_TEMP, + ColorMode, LightEntity, ) from homeassistant.core import HomeAssistant, callback @@ -75,8 +74,8 @@ class HASensemeFanLight(HASensemeLight): def __init__(self, device: SensemeDevice) -> None: """Init a fan light.""" super().__init__(device, device.name) - self._attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} - self._attr_color_mode = COLOR_MODE_BRIGHTNESS + self._attr_supported_color_modes = {ColorMode.BRIGHTNESS} + self._attr_color_mode = ColorMode.BRIGHTNESS class HASensemeStandaloneLight(HASensemeLight): @@ -85,8 +84,8 @@ class HASensemeStandaloneLight(HASensemeLight): def __init__(self, device: SensemeDevice) -> None: """Init a standalone light.""" super().__init__(device, f"{device.name} Light") - self._attr_supported_color_modes = {COLOR_MODE_COLOR_TEMP} - self._attr_color_mode = COLOR_MODE_COLOR_TEMP + self._attr_supported_color_modes = {ColorMode.COLOR_TEMP} + self._attr_color_mode = ColorMode.COLOR_TEMP self._attr_min_mireds = color_temperature_kelvin_to_mired( device.light_color_temp_max )