Use ColorMode enum in myq (#70524)

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

View File

@ -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):