Reset bridge connection upon failure

This commit is contained in:
Fabio Manganiello 2019-02-08 19:59:25 +01:00
parent e2b0bf8462
commit 434bc8a5eb
1 changed files with 3 additions and 0 deletions

View File

@ -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'))