Migrate avion light to color_mode (#69075)
This commit is contained in:
parent
d96ace82aa
commit
230f0122ff
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue