mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 10:47:51 +00:00
Migrate everlights light to color_mode (#69182)
This commit is contained in:
parent
beb5184720
commit
88b01b80ce
@ -11,9 +11,8 @@ from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
ATTR_EFFECT,
|
||||
ATTR_HS_COLOR,
|
||||
COLOR_MODE_HS,
|
||||
PLATFORM_SCHEMA,
|
||||
SUPPORT_BRIGHTNESS,
|
||||
SUPPORT_COLOR,
|
||||
SUPPORT_EFFECT,
|
||||
LightEntity,
|
||||
)
|
||||
@ -28,8 +27,6 @@ import homeassistant.util.color as color_util
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
SUPPORT_EVERLIGHTS = SUPPORT_EFFECT | SUPPORT_BRIGHTNESS | SUPPORT_COLOR
|
||||
|
||||
SCAN_INTERVAL = timedelta(minutes=1)
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
@ -77,6 +74,10 @@ async def async_setup_platform(
|
||||
class EverLightsLight(LightEntity):
|
||||
"""Representation of a Flux light."""
|
||||
|
||||
_attr_color_mode = COLOR_MODE_HS
|
||||
_attr_supported_color_modes = {COLOR_MODE_HS}
|
||||
_attr_supported_features = SUPPORT_EFFECT
|
||||
|
||||
def __init__(self, api, channel, status, effects):
|
||||
"""Initialize the light."""
|
||||
self._api = api
|
||||
@ -125,11 +126,6 @@ class EverLightsLight(LightEntity):
|
||||
"""Return the effect property."""
|
||||
return self._effect
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
"""Flag supported features."""
|
||||
return SUPPORT_EVERLIGHTS
|
||||
|
||||
@property
|
||||
def effect_list(self):
|
||||
"""Return the list of supported effects."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user