From 434bc8a5ebdb49a68856b507bcc18a7da58b6190 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 8 Feb 2019 19:59:25 +0100 Subject: [PATCH] Reset bridge connection upon failure --- platypush/plugins/light/hue/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platypush/plugins/light/hue/__init__.py b/platypush/plugins/light/hue/__init__.py index 30c187f5..9f342c83 100644 --- a/platypush/plugins/light/hue/__init__.py +++ b/platypush/plugins/light/hue/__init__.py @@ -265,6 +265,9 @@ class LightHuePlugin(LightPlugin): lights = self.lights groups = self.groups + if not self.bridge: + self.connect() + try: if attr == 'scene': self.bridge.run_scene(groups[0], kwargs.pop('name'))