From 6e1b8a9387dbd4551bf5b5f57f9c3250061dbe3b Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:44:48 +0200 Subject: [PATCH] Use ColorMode enum in tellstick (#70540) --- homeassistant/components/tellstick/light.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/tellstick/light.py b/homeassistant/components/tellstick/light.py index 893e67c897d..136dd3ebbd6 100644 --- a/homeassistant/components/tellstick/light.py +++ b/homeassistant/components/tellstick/light.py @@ -1,11 +1,7 @@ """Support for Tellstick 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 @@ -45,8 +41,8 @@ def setup_platform( class TellstickLight(TellstickDevice, LightEntity): """Representation of a Tellstick 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, tellcore_device, signal_repetitions): """Initialize the Tellstick light."""