Migrate blinkstick light to color_mode (#69076)
parent
230f0122ff
commit
fd6cedeeb8
|
@ -7,9 +7,8 @@ import voluptuous as vol
|
|||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
ATTR_HS_COLOR,
|
||||
COLOR_MODE_HS,
|
||||
PLATFORM_SCHEMA,
|
||||
SUPPORT_BRIGHTNESS,
|
||||
SUPPORT_COLOR,
|
||||
LightEntity,
|
||||
)
|
||||
from homeassistant.const import CONF_NAME
|
||||
|
@ -23,8 +22,6 @@ CONF_SERIAL = "serial"
|
|||
|
||||
DEFAULT_NAME = "Blinkstick"
|
||||
|
||||
SUPPORT_BLINKSTICK = SUPPORT_BRIGHTNESS | SUPPORT_COLOR
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
{
|
||||
vol.Required(CONF_SERIAL): cv.string,
|
||||
|
@ -52,7 +49,8 @@ def setup_platform(
|
|||
class BlinkStickLight(LightEntity):
|
||||
"""Representation of a BlinkStick light."""
|
||||
|
||||
_attr_supported_features = SUPPORT_BLINKSTICK
|
||||
_attr_color_mode = COLOR_MODE_HS
|
||||
_attr_supported_color_modes = {COLOR_MODE_HS}
|
||||
|
||||
def __init__(self, stick, name):
|
||||
"""Initialize the light."""
|
||||
|
|
Loading…
Reference in New Issue