mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Use ColorMode enum in blinksticklight (#70433)
This commit is contained in:
parent
0e1911cd9b
commit
72b31ca51a
@ -7,8 +7,8 @@ import voluptuous as vol
|
|||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
ATTR_HS_COLOR,
|
ATTR_HS_COLOR,
|
||||||
COLOR_MODE_HS,
|
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_NAME
|
from homeassistant.const import CONF_NAME
|
||||||
@ -49,8 +49,8 @@ def setup_platform(
|
|||||||
class BlinkStickLight(LightEntity):
|
class BlinkStickLight(LightEntity):
|
||||||
"""Representation of a BlinkStick light."""
|
"""Representation of a BlinkStick light."""
|
||||||
|
|
||||||
_attr_color_mode = COLOR_MODE_HS
|
_attr_color_mode = ColorMode.HS
|
||||||
_attr_supported_color_modes = {COLOR_MODE_HS}
|
_attr_supported_color_modes = {ColorMode.HS}
|
||||||
|
|
||||||
def __init__(self, stick, name):
|
def __init__(self, stick, name):
|
||||||
"""Initialize the light."""
|
"""Initialize the light."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user