Use ColorMode enum in isy994 (#70509)

pull/70543/head
epenet 2022-04-23 21:06:23 +02:00 committed by GitHub
parent fddc0e14c0
commit 50823045e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -7,11 +7,7 @@ from pyisy.constants import ISY_VALUE_UNKNOWN
from pyisy.helpers import NodeProperty
from pyisy.nodes import Node
from homeassistant.components.light import (
COLOR_MODE_BRIGHTNESS,
DOMAIN as LIGHT,
LightEntity,
)
from homeassistant.components.light import DOMAIN as LIGHT, ColorMode, LightEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -51,8 +47,8 @@ async def async_setup_entry(
class ISYLightEntity(ISYNodeEntity, LightEntity, RestoreEntity):
"""Representation of an ISY994 light device."""
_attr_color_mode = COLOR_MODE_BRIGHTNESS
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}
_attr_color_mode = ColorMode.BRIGHTNESS
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
def __init__(self, node: Node, restore_light_state: bool) -> None:
"""Initialize the ISY994 light device."""