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,
}
for g in groups:
self.animations['groups'][g.group_id] = info
if groups:
for g in groups:
self.animations['groups'][g.group_id] = info
for l in self.bridge.lights:
if l.name in lights: