Use light enums in upb (#70786)
This commit is contained in:
parent
fe0120b65a
commit
56e0b8dbb5
1 changed files with 4 additions and 5 deletions
|
@ -3,10 +3,9 @@ from homeassistant.components.light import (
|
|||
ATTR_BRIGHTNESS,
|
||||
ATTR_FLASH,
|
||||
ATTR_TRANSITION,
|
||||
SUPPORT_FLASH,
|
||||
SUPPORT_TRANSITION,
|
||||
ColorMode,
|
||||
LightEntity,
|
||||
LightEntityFeature,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -68,11 +67,11 @@ class UpbLight(UpbAttachedEntity, LightEntity):
|
|||
return {self.color_mode}
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
def supported_features(self) -> int:
|
||||
"""Flag supported features."""
|
||||
if self._element.dimmable:
|
||||
return SUPPORT_TRANSITION | SUPPORT_FLASH
|
||||
return SUPPORT_FLASH
|
||||
return LightEntityFeature.TRANSITION | LightEntityFeature.FLASH
|
||||
return LightEntityFeature.FLASH
|
||||
|
||||
@property
|
||||
def brightness(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue