From 4e6043e05e2270a86409365b407674db43eff231 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 27 Apr 2022 09:24:45 +0200 Subject: [PATCH] Migrate lightwave light to ColorMode (#70849) --- homeassistant/components/lightwave/light.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/lightwave/light.py b/homeassistant/components/lightwave/light.py index 4a261c39361..8d46592f439 100644 --- a/homeassistant/components/lightwave/light.py +++ b/homeassistant/components/lightwave/light.py @@ -1,11 +1,7 @@ """Support for LightwaveRF lights.""" from __future__ import annotations -from homeassistant.components.light import ( - ATTR_BRIGHTNESS, - SUPPORT_BRIGHTNESS, - LightEntity, -) +from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity from homeassistant.const import CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -39,7 +35,8 @@ async def async_setup_platform( class LWRFLight(LightEntity): """Representation of a LightWaveRF light.""" - _attr_supported_features = SUPPORT_BRIGHTNESS + _attr_color_mode = ColorMode.BRIGHTNESS + _attr_supported_color_modes = {ColorMode.BRIGHTNESS} _attr_should_poll = False def __init__(self, name, device_id, lwlink):