From 34a9a1d15235542ae7406572a9eeb0f8998efbe2 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 7 Apr 2022 09:12:28 +0200 Subject: [PATCH] Migrate unifiprotect light to color_mode (#69527) --- homeassistant/components/unifiprotect/light.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/unifiprotect/light.py b/homeassistant/components/unifiprotect/light.py index 8e2adf82043..9dc61471caa 100644 --- a/homeassistant/components/unifiprotect/light.py +++ b/homeassistant/components/unifiprotect/light.py @@ -8,7 +8,7 @@ from pyunifiprotect.data import Light from homeassistant.components.light import ( ATTR_BRIGHTNESS, - SUPPORT_BRIGHTNESS, + COLOR_MODE_BRIGHTNESS, LightEntity, ) from homeassistant.config_entries import ConfigEntry @@ -59,7 +59,8 @@ class ProtectLight(ProtectDeviceEntity, LightEntity): device: Light _attr_icon = "mdi:spotlight-beam" - _attr_supported_features = SUPPORT_BRIGHTNESS + _attr_color_mode = COLOR_MODE_BRIGHTNESS + _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} @callback def _async_update_device_from_protect(self) -> None: