Migrate blinkstick light to color_mode (#69076)

pull/69233/head^2
Erik Montnemery 2022-04-04 10:52:29 +02:00 committed by GitHub
parent 230f0122ff
commit fd6cedeeb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -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."""