From f7e05c5e1c750d2af6df5f7ac6bfa76d7b0dd31f Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 27 Apr 2022 15:42:01 +0200 Subject: [PATCH] Migrate ring light to ColorMode (#70903) --- homeassistant/components/ring/light.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/ring/light.py b/homeassistant/components/ring/light.py index aa76d89fea1..5b2cd1c54db 100644 --- a/homeassistant/components/ring/light.py +++ b/homeassistant/components/ring/light.py @@ -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)