From 9a7f6393aac5e0018923b63fea6eddb880f454d2 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 26 Apr 2022 14:59:24 +0200 Subject: [PATCH] Use light enums in smarttub (#70789) --- homeassistant/components/smarttub/light.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/smarttub/light.py b/homeassistant/components/smarttub/light.py index accb105e88e..b8750c50611 100644 --- a/homeassistant/components/smarttub/light.py +++ b/homeassistant/components/smarttub/light.py @@ -5,9 +5,9 @@ from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_EFFECT, EFFECT_COLORLOOP, - SUPPORT_EFFECT, ColorMode, LightEntity, + LightEntityFeature, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant @@ -45,6 +45,7 @@ class SmartTubLight(SmartTubEntity, LightEntity): _attr_color_mode = ColorMode.BRIGHTNESS _attr_supported_color_modes = {ColorMode.BRIGHTNESS} + _attr_supported_features = LightEntityFeature.EFFECT def __init__(self, coordinator, light): """Initialize the entity.""" @@ -89,11 +90,6 @@ class SmartTubLight(SmartTubEntity, LightEntity): """Return true if the light is on.""" return self.light.mode != SpaLight.LightMode.OFF - @property - def supported_features(self): - """Flag supported features.""" - return SUPPORT_EFFECT - @property def effect(self): """Return the current effect."""