Initialize the animation groups map only if groups was specified

This commit is contained in:
Fabio Manganiello 2019-11-03 14:44:58 +01:00
parent c4f4d61851
commit 6aa13a10cb

View file

@ -775,8 +775,9 @@ class LightHuePlugin(LightPlugin):
'transition_seconds': transition_seconds, 'transition_seconds': transition_seconds,
} }
for g in groups: if groups:
self.animations['groups'][g.group_id] = info for g in groups:
self.animations['groups'][g.group_id] = info
for l in self.bridge.lights: for l in self.bridge.lights:
if l.name in lights: if l.name in lights: