Migrate avea light to color_mode (#69073)
This commit is contained in:
parent
bfbe0d1d76
commit
d96ace82aa
1 changed files with 3 additions and 5 deletions
|
@ -6,8 +6,7 @@ import avea # pylint: disable=import-error
|
|||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
ATTR_HS_COLOR,
|
||||
SUPPORT_BRIGHTNESS,
|
||||
SUPPORT_COLOR,
|
||||
COLOR_MODE_HS,
|
||||
LightEntity,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -16,8 +15,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
import homeassistant.util.color as color_util
|
||||
|
||||
SUPPORT_AVEA = SUPPORT_BRIGHTNESS | SUPPORT_COLOR
|
||||
|
||||
|
||||
def setup_platform(
|
||||
hass: HomeAssistant,
|
||||
|
@ -40,7 +37,8 @@ def setup_platform(
|
|||
class AveaLight(LightEntity):
|
||||
"""Representation of an Avea."""
|
||||
|
||||
_attr_supported_features = SUPPORT_AVEA
|
||||
_attr_color_mode = COLOR_MODE_HS
|
||||
_attr_supported_color_modes = {COLOR_MODE_HS}
|
||||
|
||||
def __init__(self, light):
|
||||
"""Initialize an AveaLight."""
|
||||
|
|
Loading…
Add table
Reference in a new issue