mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Use ColorMode enum in greenwave (#70499)
This commit is contained in:
parent
24ace6a1fb
commit
033445721d
@ -10,8 +10,8 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
COLOR_MODE_BRIGHTNESS,
|
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST
|
from homeassistant.const import CONF_HOST
|
||||||
@ -65,8 +65,8 @@ def setup_platform(
|
|||||||
class GreenwaveLight(LightEntity):
|
class GreenwaveLight(LightEntity):
|
||||||
"""Representation of an Greenwave Reality Light."""
|
"""Representation of an Greenwave Reality Light."""
|
||||||
|
|
||||||
_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, light, host, token, gatewaydata):
|
def __init__(self, light, host, token, gatewaydata):
|
||||||
"""Initialize a Greenwave Reality Light."""
|
"""Initialize a Greenwave Reality Light."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user