From 23974eed418961115d92a94a5e21e90519c6f77a Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:43:16 +0200 Subject: [PATCH] Use ColorMode enum in switch_as_x (#70538) --- homeassistant/components/switch_as_x/light.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/switch_as_x/light.py b/homeassistant/components/switch_as_x/light.py index 93dba7c8551..1071d6b4480 100644 --- a/homeassistant/components/switch_as_x/light.py +++ b/homeassistant/components/switch_as_x/light.py @@ -1,7 +1,7 @@ """Light support for switch entities.""" from __future__ import annotations -from homeassistant.components.light import COLOR_MODE_ONOFF, LightEntity +from homeassistant.components.light import ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_ENTITY_ID from homeassistant.core import HomeAssistant @@ -39,5 +39,5 @@ async def async_setup_entry( class LightSwitch(BaseToggleEntity, LightEntity): """Represents a Switch as a Light.""" - _attr_color_mode = COLOR_MODE_ONOFF - _attr_supported_color_modes = {COLOR_MODE_ONOFF} + _attr_color_mode = ColorMode.ONOFF + _attr_supported_color_modes = {ColorMode.ONOFF}