Use ColorMode enum in insteon (#70511)
This commit is contained in:
parent
149cc01ed3
commit
2f26407a31
1 changed files with 3 additions and 3 deletions
|
@ -3,8 +3,8 @@ from pyinsteon.extended_property import ON_LEVEL
|
||||||
|
|
||||||
from homeassistant.components.light import (
|
from homeassistant.components.light import (
|
||||||
ATTR_BRIGHTNESS,
|
ATTR_BRIGHTNESS,
|
||||||
COLOR_MODE_BRIGHTNESS,
|
|
||||||
DOMAIN as LIGHT_DOMAIN,
|
DOMAIN as LIGHT_DOMAIN,
|
||||||
|
ColorMode,
|
||||||
LightEntity,
|
LightEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
@ -41,8 +41,8 @@ async def async_setup_entry(
|
||||||
class InsteonDimmerEntity(InsteonEntity, LightEntity):
|
class InsteonDimmerEntity(InsteonEntity, LightEntity):
|
||||||
"""A Class for an Insteon light entity."""
|
"""A Class for an Insteon light entity."""
|
||||||
|
|
||||||
_attr_color_mode = COLOR_MODE_BRIGHTNESS
|
_attr_color_mode = ColorMode.BRIGHTNESS
|
||||||
_attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS}
|
_attr_supported_color_modes = {ColorMode.BRIGHTNESS}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def brightness(self):
|
def brightness(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue