Migrate xbee light to ColorMode (#70907)

This commit is contained in:
epenet 2022-04-27 15:39:58 +02:00 committed by GitHub
parent db296a6d1e
commit 9daf3d8e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,7 @@ from __future__ import annotations
import voluptuous as vol
from homeassistant.components.light import LightEntity
from homeassistant.components.light import ColorMode, LightEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
@ -29,3 +29,6 @@ def setup_platform(
class XBeeLight(XBeeDigitalOut, LightEntity):
"""Use XBeeDigitalOut as light."""
_attr_color_mode = ColorMode.ONOFF
_attr_supported_color_modes = {ColorMode.ONOFF}