mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Use ColorMode enum in kulersky (#70514)
This commit is contained in:
parent
7e7519fe05
commit
cf4232467c
@ -9,7 +9,7 @@ import pykulersky
|
|||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
ATTR_RGBW_COLOR,
|
ATTR_RGBW_COLOR,
|
||||||
COLOR_MODE_RGBW,
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@ -67,8 +67,8 @@ class KulerskyLight(LightEntity):
|
|||||||
"""Initialize a Kuler Sky light."""
|
"""Initialize a Kuler Sky light."""
|
||||||
self._light = light
|
self._light = light
|
||||||
self._available = False
|
self._available = False
|
||||||
self._attr_supported_color_modes = {COLOR_MODE_RGBW}
|
self._attr_supported_color_modes = {ColorMode.RGBW}
|
||||||
self._attr_color_mode = COLOR_MODE_RGBW
|
self._attr_color_mode = ColorMode.RGBW
|
||||||
|
|
||||||
async def async_added_to_hass(self) -> None:
|
async def async_added_to_hass(self) -> None:
|
||||||
"""Run when entity about to be added to hass."""
|
"""Run when entity about to be added to hass."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user