mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Use light enums in velbus (#70784)
This commit is contained in:
parent
7ab0dc5177
commit
bac69d9e75
@ -15,10 +15,9 @@ from homeassistant.components.light import (
|
||||
ATTR_TRANSITION,
|
||||
FLASH_LONG,
|
||||
FLASH_SHORT,
|
||||
SUPPORT_FLASH,
|
||||
SUPPORT_TRANSITION,
|
||||
ColorMode,
|
||||
LightEntity,
|
||||
LightEntityFeature,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
@ -51,7 +50,7 @@ class VelbusLight(VelbusEntity, LightEntity):
|
||||
_channel: VelbusDimmer
|
||||
_attr_color_mode = ColorMode.BRIGHTNESS
|
||||
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
|
||||
_attr_supported_features = SUPPORT_TRANSITION
|
||||
_attr_supported_features = LightEntityFeature.TRANSITION
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
@ -101,7 +100,7 @@ class VelbusButtonLight(VelbusEntity, LightEntity):
|
||||
_attr_entity_category = EntityCategory.CONFIG
|
||||
_attr_color_mode = ColorMode.ONOFF
|
||||
_attr_supported_color_modes = {ColorMode.ONOFF}
|
||||
_attr_supported_features = SUPPORT_FLASH
|
||||
_attr_supported_features = LightEntityFeature.FLASH
|
||||
|
||||
def __init__(self, channel: VelbusChannel) -> None:
|
||||
"""Initialize the button light (led)."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user