Update sunrise-sunset.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Tue, 6 Aug 2019 20:10:02 +0000 (13:10 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Tue, 6 Aug 2019 20:10:02 +0000 (13:10 -0700)
official/sunrise-sunset.groovy

index 3e4fd1f60a1f1068b9c4a62ccae8ee4960f92d08..f1d88e736c6c878aeebd725144f115dffbd9c04a 100755 (executable)
@@ -71,18 +71,22 @@ def initialize() {
        subscribe(location, "position", locationPositionChange)
        subscribe(location, "sunriseTime", sunriseSunsetTimeHandler)
        subscribe(location, "sunsetTime", sunriseSunsetTimeHandler)
        subscribe(location, "position", locationPositionChange)
        subscribe(location, "sunriseTime", sunriseSunsetTimeHandler)
        subscribe(location, "sunsetTime", sunriseSunsetTimeHandler)
-
-       astroCheck()
+       
+       //astroCheck()
 }
 
 def locationPositionChange(evt) {
        log.trace "locationChange()"
 }
 
 def locationPositionChange(evt) {
        log.trace "locationChange()"
-       astroCheck()
+       schedule("someTime", sunriseHandler)
+       schedule("someTime", sunsetHandler)
+       //astroCheck()
 }
 
 def sunriseSunsetTimeHandler(evt) {
        log.trace "sunriseSunsetTimeHandler()"
 }
 
 def sunriseSunsetTimeHandler(evt) {
        log.trace "sunriseSunsetTimeHandler()"
-       astroCheck()
+       schedule("someTime", sunriseHandler)
+       schedule("someTime", sunsetHandler)
+       //astroCheck()
 }
 
 def astroCheck() {
 }
 
 def astroCheck() {