Use ColorMode enum in kulersky (#70514)

This commit is contained in:
epenet 2022-04-23 21:17:31 +02:00 committed by GitHub
parent 7e7519fe05
commit cf4232467c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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."""