Use ColorMode enum in myq (#70524)
parent
4a276d90b0
commit
1677a76ba4
|
@ -1,7 +1,7 @@
|
|||
"""Support for MyQ-Enabled lights."""
|
||||
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.const import STATE_OFF, STATE_ON
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -30,8 +30,8 @@ async def async_setup_entry(
|
|||
class MyQLight(MyQEntity, LightEntity):
|
||||
"""Representation of a MyQ light."""
|
||||
|
||||
_attr_color_mode = COLOR_MODE_ONOFF
|
||||
_attr_supported_color_modes = {COLOR_MODE_ONOFF}
|
||||
_attr_color_mode = ColorMode.ONOFF
|
||||
_attr_supported_color_modes = {ColorMode.ONOFF}
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
|
Loading…
Reference in New Issue