Migrate screenlogic light to ColorMode (#70902)

This commit is contained in:
epenet 2022-04-27 15:42:35 +02:00 committed by GitHub
parent f7e05c5e1c
commit 906c12d8aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ import logging
from screenlogicpy.const import DATA as SL_DATA, GENERIC_CIRCUIT_NAMES
from homeassistant.components.light import LightEntity
from homeassistant.components.light import ColorMode, LightEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -34,3 +34,6 @@ async def async_setup_entry(
class ScreenLogicLight(ScreenLogicCircuitEntity, LightEntity):
"""Class to represent a ScreenLogic Light."""
_attr_color_mode = ColorMode.ONOFF
_attr_supported_color_modes = {ColorMode.ONOFF}