mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Use ColorMode enum in homeworks (#70506)
This commit is contained in:
parent
e30b3b4ab1
commit
ee1ac730b8
@ -5,11 +5,7 @@ import logging
|
||||
|
||||
from pyhomeworks.pyhomeworks import HW_LIGHT_CHANGED
|
||||
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
COLOR_MODE_BRIGHTNESS,
|
||||
LightEntity,
|
||||
)
|
||||
from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity
|
||||
from homeassistant.const import CONF_NAME
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
@ -44,8 +40,8 @@ def setup_platform(
|
||||
class HomeworksLight(HomeworksDevice, LightEntity):
|
||||
"""Homeworks Light."""
|
||||
|
||||
_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, controller, addr, name, rate):
|
||||
"""Create device with Addr, name, and rate."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user