From 5bb850eea38f10b5d0bb2b790f1dfdcaff6c591e Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:21:57 +0200 Subject: [PATCH] Use ColorMode enum in lutron (#70518) --- homeassistant/components/lutron/light.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/lutron/light.py b/homeassistant/components/lutron/light.py index 8f99caf691a..52ff2d7843c 100644 --- a/homeassistant/components/lutron/light.py +++ b/homeassistant/components/lutron/light.py @@ -1,11 +1,7 @@ """Support for Lutron lights.""" from __future__ import annotations -from homeassistant.components.light import ( - ATTR_BRIGHTNESS, - COLOR_MODE_BRIGHTNESS, - LightEntity, -) +from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType @@ -41,8 +37,8 @@ def to_hass_level(level): class LutronLight(LutronDevice, LightEntity): """Representation of a Lutron Light, including dimmable.""" - _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, area_name, lutron_device, controller): """Initialize the light."""