From edffac82e9cab6b544fec74025d0bef46e7c34df Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 22 Apr 2022 15:31:11 +0200 Subject: [PATCH] Use ColorMode enum in devolo_home_control (#70435) --- homeassistant/components/devolo_home_control/light.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/devolo_home_control/light.py b/homeassistant/components/devolo_home_control/light.py index 05a4c52cfef..4ccd5a00ab2 100644 --- a/homeassistant/components/devolo_home_control/light.py +++ b/homeassistant/components/devolo_home_control/light.py @@ -6,11 +6,7 @@ from typing import Any from devolo_home_control_api.devices.zwave import Zwave from devolo_home_control_api.homecontrol import HomeControl -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 from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -53,8 +49,8 @@ class DevoloLightDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, LightEntity): element_uid=element_uid, ) - self._attr_color_mode = COLOR_MODE_BRIGHTNESS - self._attr_supported_color_modes = {COLOR_MODE_BRIGHTNESS} + self._attr_color_mode = ColorMode.BRIGHTNESS + self._attr_supported_color_modes = {ColorMode.BRIGHTNESS} self._binary_switch_property = device_instance.binary_switch_property.get( element_uid.replace("Dimmer", "BinarySwitch") )