From e63aef79fec62865b99d638559e13988ded6e7b7 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 29 Apr 2022 21:43:33 +0200 Subject: [PATCH] Use LightEntityFeature enum in template (#71056) --- homeassistant/components/template/light.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/template/light.py b/homeassistant/components/template/light.py index efe123f36b5..32ce215a41f 100644 --- a/homeassistant/components/template/light.py +++ b/homeassistant/components/template/light.py @@ -16,10 +16,9 @@ from homeassistant.components.light import ( SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, - SUPPORT_EFFECT, - SUPPORT_TRANSITION, SUPPORT_WHITE_VALUE, LightEntity, + LightEntityFeature, ) from homeassistant.const import ( CONF_ENTITY_ID, @@ -254,9 +253,9 @@ class LightTemplate(TemplateEntity, LightEntity): if self._white_value_script is not None: supported_features |= SUPPORT_WHITE_VALUE if self._effect_script is not None: - supported_features |= SUPPORT_EFFECT + supported_features |= LightEntityFeature.EFFECT if self._supports_transition is True: - supported_features |= SUPPORT_TRANSITION + supported_features |= LightEntityFeature.TRANSITION return supported_features @property