From 6aa13a10cb4399fb9047af7f808e6cd33848378f Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 3 Nov 2019 14:44:58 +0100 Subject: [PATCH] Initialize the animation groups map only if groups was specified --- platypush/plugins/light/hue/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/light/hue/__init__.py b/platypush/plugins/light/hue/__init__.py index b0fb8af33..23fb759b1 100644 --- a/platypush/plugins/light/hue/__init__.py +++ b/platypush/plugins/light/hue/__init__.py @@ -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: