Use ColorMode enum in x10 (#70556)
This commit is contained in:
parent
d00d9a2473
commit
663dbc4080
1 changed files with 3 additions and 3 deletions
|
@ -8,8 +8,8 @@ import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
COLOR_MODE_BRIGHTNESS,
|
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_DEVICES, CONF_ID, CONF_NAME
|
from homeassistant.const import CONF_DEVICES, CONF_ID, CONF_NAME
|
||||||
|
@ -61,8 +61,8 @@ def setup_platform(
|
||||||
class X10Light(LightEntity):
|
class X10Light(LightEntity):
|
||||||
"""Representation of an X10 Light."""
|
"""Representation of an X10 Light."""
|
||||||
|
|
||||||
_attr_color_mode = COLOR_MODE_BRIGHTNESS
|
_attr_color_mode = ColorMode.BRIGHTNESS
|
||||||
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}
|
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
|
||||||
|
|
||||||
def __init__(self, light, is_cm11a):
|
def __init__(self, light, is_cm11a):
|
||||||
"""Initialize an X10 Light."""
|
"""Initialize an X10 Light."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue