Omit unknown hue effects (#138992)

This commit is contained in:
Joost Lekkerkerker 2025-02-21 19:30:48 +01:00 committed by Franck Nijhof
parent 325022ec77
commit 0dbdb42947
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -107,7 +107,9 @@ class HueLight(HueBaseEntity, LightEntity):
self._attr_effect_list = [] self._attr_effect_list = []
if effects := resource.effects: if effects := resource.effects:
self._attr_effect_list = [ self._attr_effect_list = [
x.value for x in effects.status_values if x != EffectStatus.NO_EFFECT x.value
for x in effects.status_values
if x not in (EffectStatus.NO_EFFECT, EffectStatus.UNKNOWN)
] ]
if timed_effects := resource.timed_effects: if timed_effects := resource.timed_effects:
self._attr_effect_list += [ self._attr_effect_list += [