From 6e14f67860798c93632140413a17ea777057cfb0 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:44:29 +0200 Subject: [PATCH] Use ColorMode enum in tolo (#70541) --- homeassistant/components/tolo/light.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/tolo/light.py b/homeassistant/components/tolo/light.py index f58f7e7b8c9..715a1327e4b 100644 --- a/homeassistant/components/tolo/light.py +++ b/homeassistant/components/tolo/light.py @@ -1,10 +1,9 @@ """TOLO Sauna light controls.""" - from __future__ import annotations from typing import Any -from homeassistant.components.light import COLOR_MODE_ONOFF, LightEntity +from homeassistant.components.light import ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback @@ -26,8 +25,9 @@ async def async_setup_entry( class ToloLight(ToloSaunaCoordinatorEntity, LightEntity): """Sauna light control.""" + _attr_color_mode = ColorMode.ONOFF _attr_name = "Sauna Light" - _attr_supported_color_modes = {COLOR_MODE_ONOFF} + _attr_supported_color_modes = {ColorMode.ONOFF} def __init__( self, coordinator: ToloSaunaUpdateCoordinator, entry: ConfigEntry