mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 02:37:50 +00:00
Migrate lutron_caseta light to color_mode (#69423)
This commit is contained in:
parent
af5d29735f
commit
8cba371318
@ -5,8 +5,8 @@ import logging
|
|||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
ATTR_TRANSITION,
|
ATTR_TRANSITION,
|
||||||
|
COLOR_MODE_BRIGHTNESS,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SUPPORT_BRIGHTNESS,
|
|
||||||
SUPPORT_TRANSITION,
|
SUPPORT_TRANSITION,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
@ -56,10 +56,9 @@ async def async_setup_entry(
|
|||||||
class LutronCasetaLight(LutronCasetaDevice, LightEntity):
|
class LutronCasetaLight(LutronCasetaDevice, LightEntity):
|
||||||
"""Representation of a Lutron Light, including dimmable."""
|
"""Representation of a Lutron Light, including dimmable."""
|
||||||
|
|
||||||
@property
|
_attr_color_mode = COLOR_MODE_BRIGHTNESS
|
||||||
def supported_features(self):
|
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}
|
||||||
"""Flag supported features."""
|
_attr_supported_features = SUPPORT_TRANSITION
|
||||||
return SUPPORT_BRIGHTNESS | SUPPORT_TRANSITION
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def brightness(self):
|
def brightness(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user