From fddc0e14c0146c3be17045ee450990cc4b00b24a Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 20:40:58 +0200 Subject: [PATCH] Use ColorMode enum in elkm1 (#70488) --- homeassistant/components/elkm1/light.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/elkm1/light.py b/homeassistant/components/elkm1/light.py index 936a71d13e0..9e008359e8c 100644 --- a/homeassistant/components/elkm1/light.py +++ b/homeassistant/components/elkm1/light.py @@ -7,11 +7,7 @@ from elkm1_lib.elements import Element from elkm1_lib.elk import Elk from elkm1_lib.lights import Light -from homeassistant.components.light import ( - ATTR_BRIGHTNESS, - COLOR_MODE_BRIGHTNESS, - LightEntity, -) +from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -36,8 +32,8 @@ async def async_setup_entry( class ElkLight(ElkEntity, LightEntity): """Representation of an Elk lighting device.""" - _attr_color_mode = COLOR_MODE_BRIGHTNESS - _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + _attr_color_mode = ColorMode.BRIGHTNESS + _attr_supported_color_modes = {ColorMode.BRIGHTNESS} _element: Light def __init__(self, element: Element, elk: Elk, elk_data: dict[str, Any]) -> None: