Use EntityFeature enum in components (i**) (#69409)

This commit is contained in:
epenet 2022-04-07 09:35:27 +02:00 committed by GitHub
parent 75eec850c1
commit e6d8aa34fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 109 additions and 167 deletions

View file

@ -7,8 +7,8 @@ from homeassistant.components.light import (
COLOR_MODE_BRIGHTNESS,
COLOR_MODE_ONOFF,
DOMAIN,
SUPPORT_EFFECT,
LightEntity,
LightEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
@ -102,6 +102,6 @@ class HassAqualinkLight(AqualinkEntity, LightEntity):
def supported_features(self) -> int:
"""Return the list of features supported by the light."""
if self.dev.is_color:
return SUPPORT_EFFECT
return LightEntityFeature.EFFECT
return 0