Migrate lutron_caseta light to color_mode (#69423)

This commit is contained in:
Erik Montnemery 2022-04-07 09:08:22 +02:00 committed by GitHub
parent af5d29735f
commit 8cba371318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,8 +5,8 @@ import logging
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_TRANSITION,
COLOR_MODE_BRIGHTNESS,
DOMAIN,
SUPPORT_BRIGHTNESS,
SUPPORT_TRANSITION,
LightEntity,
)
@ -56,10 +56,9 @@ async def async_setup_entry(
class LutronCasetaLight(LutronCasetaDevice, LightEntity):
"""Representation of a Lutron Light, including dimmable."""
@property
def supported_features(self):
"""Flag supported features."""
return SUPPORT_BRIGHTNESS | SUPPORT_TRANSITION
_attr_color_mode = COLOR_MODE_BRIGHTNESS
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}
_attr_supported_features = SUPPORT_TRANSITION
@property
def brightness(self):