From 74552420bae66eef271a844d96660f180e3a7617 Mon Sep 17 00:00:00 2001 From: Lars Finander Date: Tue, 14 Mar 2017 19:28:15 -0600 Subject: [PATCH] Hue: Re-add Hue bridge if deleted -Add Hue Bridge if missing during deviceSync --- smartapps/smartthings/hue-connect.src/hue-connect.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy index 047a8dd..26128be 100644 --- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy +++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy @@ -472,8 +472,6 @@ def addBridge() { log.error "Failed to create Hue Bridge device" } } - } else { - log.debug "found ${d.displayName} with id $selectedHue already exists" } } } @@ -715,6 +713,9 @@ def doDeviceSync(){ log.warn "state.updating failed to clear" } + if (selectedHue) { + addBridge() + } convertBulbListToMap() poll() ssdpSubscribe()