From 230f0122ff1b999c524c515af380f6da59a7228d Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 4 Apr 2022 10:51:52 +0200 Subject: [PATCH] Migrate avion light to color_mode (#69075) --- homeassistant/components/avion/light.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/avion/light.py b/homeassistant/components/avion/light.py index 7a57efe6aa6..ac599f474bc 100644 --- a/homeassistant/components/avion/light.py +++ b/homeassistant/components/avion/light.py @@ -8,8 +8,8 @@ import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, + COLOR_MODE_BRIGHTNESS, PLATFORM_SCHEMA, - SUPPORT_BRIGHTNESS, LightEntity, ) from homeassistant.const import ( @@ -25,8 +25,6 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType -SUPPORT_AVION_LED = SUPPORT_BRIGHTNESS - DEVICE_SCHEMA = vol.Schema( { vol.Required(CONF_API_KEY): cv.string, @@ -75,7 +73,8 @@ def setup_platform( class AvionLight(LightEntity): """Representation of an Avion light.""" - _attr_supported_features = SUPPORT_AVION_LED + _attr_support_color_mode = COLOR_MODE_BRIGHTNESS + _attr_support_color_modes = {COLOR_MODE_BRIGHTNESS} _attr_should_poll = False _attr_assumed_state = True _attr_is_on = True