Merge pull request #430 from juano2310/Wemo

PROB-537 - Fix error in line 337
This commit is contained in:
Juan Pablo Risso
2016-01-13 13:20:10 -05:00

View File

@@ -258,8 +258,8 @@ def installed() {
def updated() {
log.trace "Updated with settings: ${settings}"
unschedule()
unsubscribe()
unschedule()
initialize()
}
@@ -325,6 +325,7 @@ def addBulbs() {
} else {
d = addChildDevice("smartthings", "Hue Bulb", dni, newHueBulb?.value.hub, ["label":newHueBulb?.value.name])
}
log.debug "created ${d.displayName} with id $dni"
} else {
log.debug "$dni in not longer paired to the Hue Bridge or ID changed"
}
@@ -333,8 +334,6 @@ def addBulbs() {
newHueBulb = bulbs.find { (app.id + "/" + it.id) == dni }
d = addChildDevice("smartthings", "Hue Bulb", dni, newHueBulb?.hub, ["label":newHueBulb?.name])
}
log.debug "created ${d.displayName} with id $dni"
d.refresh()
} else {
log.debug "found ${d.displayName} with id $dni already exists, type: '$d.typeName'"
@@ -775,4 +774,4 @@ private Boolean hasAllHubsOver(String desiredFirmware) {
private List getRealHubFirmwareVersions() {
return location.hubs*.firmwareVersionString.findAll { it }
}
}