Use light enums in nanoleaf (#70795)

pull/70803/head
epenet 2022-04-26 14:30:42 +02:00 committed by GitHub
parent 67b411d2b2
commit 01efbdb104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -12,10 +12,9 @@ from homeassistant.components.light import (
ATTR_EFFECT,
ATTR_HS_COLOR,
ATTR_TRANSITION,
SUPPORT_EFFECT,
SUPPORT_TRANSITION,
ColorMode,
LightEntity,
LightEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
@ -46,7 +45,7 @@ class NanoleafLight(NanoleafEntity, LightEntity):
"""Representation of a Nanoleaf Light."""
_attr_supported_color_modes = {ColorMode.COLOR_TEMP, ColorMode.HS}
_attr_supported_features = SUPPORT_EFFECT | SUPPORT_TRANSITION
_attr_supported_features = LightEntityFeature.EFFECT | LightEntityFeature.TRANSITION
def __init__(self, nanoleaf: Nanoleaf, coordinator: DataUpdateCoordinator) -> None:
"""Initialize the Nanoleaf light."""