From 1392b6e1a5ece399eb05c050528aac3d10a7180d Mon Sep 17 00:00:00 2001 From: vlaminck Date: Wed, 13 Jul 2016 09:27:23 -0500 Subject: [PATCH 1/2] fix divide by zero exception --- smartapps/smartthings/gentle-wake-up.src/gentle-wake-up.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartapps/smartthings/gentle-wake-up.src/gentle-wake-up.groovy b/smartapps/smartthings/gentle-wake-up.src/gentle-wake-up.groovy index 89dd9f6..ed2fe8c 100644 --- a/smartapps/smartthings/gentle-wake-up.src/gentle-wake-up.groovy +++ b/smartapps/smartthings/gentle-wake-up.src/gentle-wake-up.groovy @@ -720,7 +720,7 @@ def completionPercentage() { def now = new Date().getTime() def timeElapsed = now - atomicState.start - def totalRunTime = totalRunTimeMillis() + def totalRunTime = totalRunTimeMillis() ?: 1 def percentComplete = timeElapsed / totalRunTime * 100 log.debug "percentComplete: ${percentComplete}" From 2549372bb74c7dec5917d782a727578b9d47e4f5 Mon Sep 17 00:00:00 2001 From: tslagle13 Date: Mon, 18 Jul 2016 15:20:06 -0700 Subject: [PATCH 2/2] Add capability sensor to SS Open/Closed There are some integrations out there using the "Actuator" and "Sensor" Capabilities and this doesn't show up for them. --- .../smartsense-open-closed-sensor.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy b/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy index aaf14fb..7ff7cb8 100644 --- a/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy +++ b/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy @@ -22,6 +22,7 @@ metadata { capability "Refresh" capability "Temperature Measurement" capability "Health Check" + capability "Sensor" command "enrollResponse"