mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Use light enums in lw12wifi (#70793)
This commit is contained in:
parent
24b4690e5d
commit
7c5c0f7558
@ -12,10 +12,9 @@ from homeassistant.components.light import (
|
|||||||
ATTR_HS_COLOR,
|
ATTR_HS_COLOR,
|
||||||
ATTR_TRANSITION,
|
ATTR_TRANSITION,
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
SUPPORT_EFFECT,
|
|
||||||
SUPPORT_TRANSITION,
|
|
||||||
ColorMode,
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
|
LightEntityFeature,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT
|
from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
@ -60,7 +59,7 @@ class LW12WiFi(LightEntity):
|
|||||||
|
|
||||||
_attr_color_mode = ColorMode.HS
|
_attr_color_mode = ColorMode.HS
|
||||||
_attr_supported_color_modes = {ColorMode.HS}
|
_attr_supported_color_modes = {ColorMode.HS}
|
||||||
_attr_supported_features = SUPPORT_EFFECT | SUPPORT_TRANSITION
|
_attr_supported_features = LightEntityFeature.EFFECT | LightEntityFeature.TRANSITION
|
||||||
|
|
||||||
def __init__(self, name, lw12_light):
|
def __init__(self, name, lw12_light):
|
||||||
"""Initialise LW-12 WiFi LED Controller.
|
"""Initialise LW-12 WiFi LED Controller.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user