From 4a276d90b09fabbf340a79f34ffec7e88654dd65 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:25:47 +0200 Subject: [PATCH] Use ColorMode enum in overkiz (#70528) --- homeassistant/components/overkiz/light.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/overkiz/light.py b/homeassistant/components/overkiz/light.py index b640a184f58..77b8f9bad92 100644 --- a/homeassistant/components/overkiz/light.py +++ b/homeassistant/components/overkiz/light.py @@ -8,9 +8,7 @@ from pyoverkiz.enums import OverkizCommand, OverkizCommandParam, OverkizState from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_RGB_COLOR, - COLOR_MODE_BRIGHTNESS, - COLOR_MODE_ONOFF, - COLOR_MODE_RGB, + ColorMode, LightEntity, ) from homeassistant.config_entries import ConfigEntry @@ -50,11 +48,11 @@ class OverkizLight(OverkizEntity, LightEntity): self._attr_supported_color_modes = set() if self.executor.has_command(OverkizCommand.SET_RGB): - self._attr_supported_color_modes.add(COLOR_MODE_RGB) + self._attr_supported_color_modes.add(ColorMode.RGB) if self.executor.has_command(OverkizCommand.SET_INTENSITY): - self._attr_supported_color_modes.add(COLOR_MODE_BRIGHTNESS) + self._attr_supported_color_modes.add(ColorMode.BRIGHTNESS) if not self.supported_color_modes: - self._attr_supported_color_modes = {COLOR_MODE_ONOFF} + self._attr_supported_color_modes = {ColorMode.ONOFF} @property def is_on(self) -> bool: