Wattvision updates from production

This commit is contained in:
Bob Florian
2015-09-09 07:59:23 -04:00
parent 76f056180d
commit c00fbd3652

View File

@@ -348,16 +348,18 @@ private getSensorJSON(id, key) {
httpGet(uri: sensorUrl) { response ->
def json = new org.json.JSONObject(response.data)
def sensors = [:]
state.sensors = json
json.each { sensorId, sensorName ->
response.data.each { sensorId, sensorName ->
sensors[sensorId] = sensorName
createChild(sensorId, sensorName)
}
state.sensors = sensors
return "success"
}
}
def createChild(sensorId, sensorName) {