From ee1ac730b8fb0022952743afaf1c9bd7962ce283 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:15:40 +0200 Subject: [PATCH] Use ColorMode enum in homeworks (#70506) --- homeassistant/components/homeworks/light.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/homeworks/light.py b/homeassistant/components/homeworks/light.py index 9f2ffd337e1..0a8d7f2fb28 100644 --- a/homeassistant/components/homeworks/light.py +++ b/homeassistant/components/homeworks/light.py @@ -5,11 +5,7 @@ import logging from pyhomeworks.pyhomeworks import HW_LIGHT_CHANGED -from homeassistant.components.light import ( - ATTR_BRIGHTNESS, - COLOR_MODE_BRIGHTNESS, - LightEntity, -) +from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity from homeassistant.const import CONF_NAME from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import async_dispatcher_connect @@ -44,8 +40,8 @@ def setup_platform( class HomeworksLight(HomeworksDevice, LightEntity): """Homeworks Light.""" - _attr_color_mode = COLOR_MODE_BRIGHTNESS - _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + _attr_color_mode = ColorMode.BRIGHTNESS + _attr_supported_color_modes = {ColorMode.BRIGHTNESS} def __init__(self, controller, addr, name, rate): """Create device with Addr, name, and rate."""