From 1b206ddfef8747782b86caae7659071b6d63b9ed Mon Sep 17 00:00:00 2001 From: timberjoegithub Date: Sun, 12 Feb 2017 13:20:54 -0500 Subject: [PATCH] Update PhotonDS18B20.groovy --- PhotonDS18B20.groovy | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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) {