mirror of
https://github.com/timberjoegithub/SmartThingsPublic.git
synced 2026-07-21 23:52:03 +00:00
Update PhotonDS18B20.groovy
This commit is contained in:
@@ -74,18 +74,18 @@ private String parseName(String description) {
|
|||||||
|
|
||||||
private String parseValue(String description) {
|
private String parseValue(String description) {
|
||||||
if (description?.startsWith("temperature: ")) {
|
if (description?.startsWith("temperature: ")) {
|
||||||
httpPost(
|
httpGet(
|
||||||
uri: "https://api.spark.io/v1/devices/${deviceId}/strelay${relaynum}",
|
uri: "https://api.spark.io/v1/devices/${deviceId}/${deviceName}",
|
||||||
body: [access_token: token, command: relaystate],
|
body: [access_token: token, command: relaystate],
|
||||||
) {response -> log.debug (response.data)}
|
) {response -> log.debug (response.data)}
|
||||||
return zigbee.parseHATemperatureValue(description, "temperature: ", getTemperatureScale())
|
return zigbee.parseHATemperatureValue(description, "temperature: ", getTemperatureScale())
|
||||||
}
|
}
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
private put(relaystate) {
|
//private put(relaystate) {
|
||||||
//Spark Core API Call
|
//Spark Core API Call
|
||||||
httpPost(
|
// httpPost(
|
||||||
uri: "https://api.spark.io/v1/devices/${deviceId}/strelay${relaynum}",
|
// uri: "https://api.spark.io/v1/devices/${deviceId}/strelay${relaynum}",
|
||||||
body: [access_token: token, command: relaystate],
|
// body: [access_token: token, command: relaystate],
|
||||||
) {response -> log.debug (response.data)}
|
// ) {response -> log.debug (response.data)}
|
||||||
}
|
//}
|
||||||
|
|||||||
Reference in New Issue
Block a user