mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Use ColorMode enum in lutron (#70518)
This commit is contained in:
parent
addf73d007
commit
5bb850eea3
@ -1,11 +1,7 @@
|
|||||||
"""Support for Lutron lights."""
|
"""Support for Lutron lights."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity
|
||||||
ATTR_BRIGHTNESS,
|
|
||||||
COLOR_MODE_BRIGHTNESS,
|
|
||||||
LightEntity,
|
|
||||||
)
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||||
@ -41,8 +37,8 @@ def to_hass_level(level):
|
|||||||
class LutronLight(LutronDevice, LightEntity):
|
class LutronLight(LutronDevice, LightEntity):
|
||||||
"""Representation of a Lutron Light, including dimmable."""
|
"""Representation of a Lutron Light, including dimmable."""
|
||||||
|
|
||||||
_attr_color_mode = COLOR_MODE_BRIGHTNESS
|
_attr_color_mode = ColorMode.BRIGHTNESS
|
||||||
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}
|
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
|
||||||
|
|
||||||
def __init__(self, area_name, lutron_device, controller):
|
def __init__(self, area_name, lutron_device, controller):
|
||||||
"""Initialize the light."""
|
"""Initialize the light."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user