mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
Use light enums in litejet (#70794)
This commit is contained in:
parent
01efbdb104
commit
679ea69f72
@ -4,9 +4,9 @@ import logging
|
|||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
ATTR_TRANSITION,
|
ATTR_TRANSITION,
|
||||||
SUPPORT_TRANSITION,
|
|
||||||
ColorMode,
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
|
LightEntityFeature,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
@ -43,7 +43,7 @@ class LiteJetLight(LightEntity):
|
|||||||
|
|
||||||
_attr_color_mode = ColorMode.BRIGHTNESS
|
_attr_color_mode = ColorMode.BRIGHTNESS
|
||||||
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
|
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
|
||||||
_attr_supported_features = SUPPORT_TRANSITION
|
_attr_supported_features = LightEntityFeature.TRANSITION
|
||||||
|
|
||||||
def __init__(self, config_entry, lj, i, name): # pylint: disable=invalid-name
|
def __init__(self, config_entry, lj, i, name): # pylint: disable=invalid-name
|
||||||
"""Initialize a LiteJet light."""
|
"""Initialize a LiteJet light."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user