diff --git a/PhotonDS18B20.groovy b/PhotonDS18B20.groovy index fc060b6..a99729c 100644 --- a/PhotonDS18B20.groovy +++ b/PhotonDS18B20.groovy @@ -74,13 +74,12 @@ private String parseName(String description) { private String parseValue(String description) { if (description?.startsWith("temperature: ")) { + httpPost( + uri: "https://api.spark.io/v1/devices/${deviceId}/strelay${relaynum}", + body: [access_token: token, command: relaystate], + ) {response -> log.debug (response.data)} return zigbee.parseHATemperatureValue(description, "temperature: ", getTemperatureScale()) - } else if (description?.startsWith("humidity: ")) { - def pct = (description - "humidity: " - "%").trim() - if (pct.isNumber()) { - return Math.round(new BigDecimal(pct)).toString() - } - } + } null } private put(relaystate) {