mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Use ColorMode enum in smarttub (#70536)
This commit is contained in:
parent
2d498f71bb
commit
9c42443910
@ -4,9 +4,9 @@ from smarttub import SpaLight
|
|||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
ATTR_EFFECT,
|
ATTR_EFFECT,
|
||||||
COLOR_MODE_BRIGHTNESS,
|
|
||||||
EFFECT_COLORLOOP,
|
EFFECT_COLORLOOP,
|
||||||
SUPPORT_EFFECT,
|
SUPPORT_EFFECT,
|
||||||
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -43,8 +43,8 @@ async def async_setup_entry(
|
|||||||
class SmartTubLight(SmartTubEntity, LightEntity):
|
class SmartTubLight(SmartTubEntity, LightEntity):
|
||||||
"""A light on a spa."""
|
"""A light on a spa."""
|
||||||
|
|
||||||
_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, coordinator, light):
|
def __init__(self, coordinator, light):
|
||||||
"""Initialize the entity."""
|
"""Initialize the entity."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user