Update turn-on-by-zip-code.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Sat, 10 Aug 2019 21:16:22 +0000 (14:16 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Sat, 10 Aug 2019 21:16:22 +0000 (14:16 -0700)
official/turn-on-by-zip-code.groovy

index 5747876..99bc6ac 100644 (file)
@@ -68,7 +68,7 @@ def scheduleNextSunset(date = null) {
         log.info "scheduling sunset handler for $setTime"
         schedule(setTime, sunsetHandler)
     }*/
-    // schedule("someTime", sunsetHandler)
+    schedule("someTime", sunsetHandler)
 }
 
 def sunsetHandler() {
@@ -76,7 +76,7 @@ def sunsetHandler() {
     switches.on()
 
     // schedule for tomorrow
-    scheduleNextSunset(new Date() + 1)
+    //scheduleNextSunset(new Date() + 1)
 }
 
 private getSunsetOffset() {