Migrate ring light to ColorMode (#70903)
This commit is contained in:
parent
ea104feab7
commit
f7e05c5e1c
1 changed files with 4 additions and 1 deletions
|
@ -4,7 +4,7 @@ import logging
|
|||
|
||||
import requests
|
||||
|
||||
from homeassistant.components.light import LightEntity
|
||||
from homeassistant.components.light import ColorMode, LightEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -47,6 +47,9 @@ async def async_setup_entry(
|
|||
class RingLight(RingEntityMixin, LightEntity):
|
||||
"""Creates a switch to turn the ring cameras light on and off."""
|
||||
|
||||
_attr_color_mode = ColorMode.ONOFF
|
||||
_attr_supported_color_modes = {ColorMode.ONOFF}
|
||||
|
||||
def __init__(self, config_entry_id, device):
|
||||
"""Initialize the light."""
|
||||
super().__init__(config_entry_id, device)
|
||||
|
|
Loading…
Add table
Reference in a new issue