Update PhotonDS18B20.groovy

This commit is contained in:
timberjoegithub
2017-02-12 14:53:18 -05:00
committed by GitHub
parent 7ee4102e60
commit a8f5ef4d83
@@ -76,12 +76,15 @@ private String parseValue(String description) {
if (description?.startsWith("temperature: ")) { if (description?.startsWith("temperature: ")) {
httpGet( httpGet(
uri: "https://api.spark.io/v1/devices/${deviceId}/${deviceName}", uri: "https://api.spark.io/v1/devices/${deviceId}/${deviceName}",
body: [access_token: token, command: relaystate], body: [access_token: token, command: result],
) {response -> log.debug (response.data)} ) {response -> log.debug (response.data)}
return zigbee.parseHATemperatureValue(description, "temperature: ", getTemperatureScale()) return zigbee.parseHATemperatureValue(description, "temperature: ", getTemperatureScale())
} }
null null
} }
// curl https://api.particle.io/v1/devices/XXXXXX/temperature?access_token=XXXXXX
//private put(relaystate) { //private put(relaystate) {
//Spark Core API Call //Spark Core API Call
// httpPost( // httpPost(