mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Migrate lightwave light to ColorMode (#70849)
This commit is contained in:
@@ -1,11 +1,7 @@
|
|||||||
"""Support for LightwaveRF lights."""
|
"""Support for LightwaveRF 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,
|
|
||||||
SUPPORT_BRIGHTNESS,
|
|
||||||
LightEntity,
|
|
||||||
)
|
|
||||||
from homeassistant.const import CONF_NAME
|
from homeassistant.const import CONF_NAME
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
@@ -39,7 +35,8 @@ async def async_setup_platform(
|
|||||||
class LWRFLight(LightEntity):
|
class LWRFLight(LightEntity):
|
||||||
"""Representation of a LightWaveRF light."""
|
"""Representation of a LightWaveRF light."""
|
||||||
|
|
||||||
_attr_supported_features = SUPPORT_BRIGHTNESS
|
_attr_color_mode = ColorMode.BRIGHTNESS
|
||||||
|
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
|
||||||
_attr_should_poll = False
|
_attr_should_poll = False
|
||||||
|
|
||||||
def __init__(self, name, device_id, lwlink):
|
def __init__(self, name, device_id, lwlink):
|
||||||
|
Reference in New Issue
Block a user