mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Use ColorMode enum in mochad (#70521)
This commit is contained in:
parent
e1f772c88f
commit
e40b4bee2d
@ -9,8 +9,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_ADDRESS, CONF_DEVICES, CONF_NAME, CONF_PLATFORM
|
from homeassistant.const import CONF_ADDRESS, CONF_DEVICES, CONF_NAME, CONF_PLATFORM
|
||||||
@ -56,8 +56,8 @@ def setup_platform(
|
|||||||
class MochadLight(LightEntity):
|
class MochadLight(LightEntity):
|
||||||
"""Representation of a X10 dimmer over Mochad."""
|
"""Representation of a X10 dimmer over Mochad."""
|
||||||
|
|
||||||
_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, hass, ctrl, dev):
|
def __init__(self, hass, ctrl, dev):
|
||||||
"""Initialize a Mochad Light Device."""
|
"""Initialize a Mochad Light Device."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user