From 20336ec49c738b981cfca231bc30c6e4cabc8869 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 22:01:55 +0200 Subject: [PATCH] Use ColorMode enum in unifiprotect (#70547) --- homeassistant/components/unifiprotect/light.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/unifiprotect/light.py b/homeassistant/components/unifiprotect/light.py index 9dc61471caa..8a6f2f5a371 100644 --- a/homeassistant/components/unifiprotect/light.py +++ b/homeassistant/components/unifiprotect/light.py @@ -6,11 +6,7 @@ from typing import Any from pyunifiprotect.data import Light -from homeassistant.components.light import ( - ATTR_BRIGHTNESS, - COLOR_MODE_BRIGHTNESS, - LightEntity, -) +from homeassistant.components.light import ATTR_BRIGHTNESS, ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -59,8 +55,8 @@ class ProtectLight(ProtectDeviceEntity, LightEntity): device: Light _attr_icon = "mdi:spotlight-beam" - _attr_color_mode = COLOR_MODE_BRIGHTNESS - _attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + _attr_color_mode = ColorMode.BRIGHTNESS + _attr_supported_color_modes = {ColorMode.BRIGHTNESS} @callback def _async_update_device_from_protect(self) -> None: