mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use ColorMode enum in mystrom (#70526)
This commit is contained in:
parent
177e6356b1
commit
f68764a053
@ -11,10 +11,10 @@ from homeassistant.components.light import (
|
|||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
ATTR_EFFECT,
|
ATTR_EFFECT,
|
||||||
ATTR_HS_COLOR,
|
ATTR_HS_COLOR,
|
||||||
COLOR_MODE_HS,
|
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
SUPPORT_EFFECT,
|
SUPPORT_EFFECT,
|
||||||
SUPPORT_FLASH,
|
SUPPORT_FLASH,
|
||||||
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME
|
from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME
|
||||||
@ -71,8 +71,8 @@ async def async_setup_platform(
|
|||||||
class MyStromLight(LightEntity):
|
class MyStromLight(LightEntity):
|
||||||
"""Representation of the myStrom WiFi bulb."""
|
"""Representation of the myStrom WiFi bulb."""
|
||||||
|
|
||||||
_attr_color_mode = COLOR_MODE_HS
|
_attr_color_mode = ColorMode.HS
|
||||||
_attr_supported_color_modes = {COLOR_MODE_HS}
|
_attr_supported_color_modes = {ColorMode.HS}
|
||||||
_attr_supported_features = SUPPORT_EFFECT | SUPPORT_FLASH
|
_attr_supported_features = SUPPORT_EFFECT | SUPPORT_FLASH
|
||||||
|
|
||||||
def __init__(self, bulb, name, mac):
|
def __init__(self, bulb, name, mac):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user