From 56e0b8dbb5bd3d73bb54f8d7390d063fa63167a3 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 26 Apr 2022 14:32:54 +0200 Subject: [PATCH] Use light enums in upb (#70786) --- homeassistant/components/upb/light.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/upb/light.py b/homeassistant/components/upb/light.py index 2ba9f8ad8ad..13f680d9e5a 100644 --- a/homeassistant/components/upb/light.py +++ b/homeassistant/components/upb/light.py @@ -3,10 +3,9 @@ from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_FLASH, ATTR_TRANSITION, - SUPPORT_FLASH, - SUPPORT_TRANSITION, ColorMode, LightEntity, + LightEntityFeature, ) from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant @@ -68,11 +67,11 @@ class UpbLight(UpbAttachedEntity, LightEntity): return {self.color_mode} @property - def supported_features(self): + def supported_features(self) -> int: """Flag supported features.""" if self._element.dimmable: - return SUPPORT_TRANSITION | SUPPORT_FLASH - return SUPPORT_FLASH + return LightEntityFeature.TRANSITION | LightEntityFeature.FLASH + return LightEntityFeature.FLASH @property def brightness(self):