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}"