mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Use ColorMode enum in myq (#70524)
This commit is contained in:
parent
4a276d90b0
commit
1677a76ba4
@ -1,7 +1,7 @@
|
|||||||
"""Support for MyQ-Enabled lights."""
|
"""Support for MyQ-Enabled lights."""
|
||||||
from pymyq.errors import MyQError
|
from pymyq.errors import MyQError
|
||||||
|
|
||||||
from homeassistant.components.light import COLOR_MODE_ONOFF, LightEntity
|
from homeassistant.components.light import ColorMode, LightEntity
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import STATE_OFF, STATE_ON
|
from homeassistant.const import STATE_OFF, STATE_ON
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
@ -30,8 +30,8 @@ async def async_setup_entry(
|
|||||||
class MyQLight(MyQEntity, LightEntity):
|
class MyQLight(MyQEntity, LightEntity):
|
||||||
"""Representation of a MyQ light."""
|
"""Representation of a MyQ light."""
|
||||||
|
|
||||||
_attr_color_mode = COLOR_MODE_ONOFF
|
_attr_color_mode = ColorMode.ONOFF
|
||||||
_attr_supported_color_modes = {COLOR_MODE_ONOFF}
|
_attr_supported_color_modes = {ColorMode.ONOFF}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user