Update smart-nightlight.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Wed, 7 Aug 2019 01:22:02 +0000 (18:22 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Wed, 7 Aug 2019 01:22:02 +0000 (18:22 -0700)
official/smart-nightlight.groovy

index 53bc14c..ed407e7 100755 (executable)
@@ -47,7 +47,7 @@ preferences {
                input "sunsetOffsetDir", "enum", title: "Before or After", required: false, options: ["Before","After"]
        }
        section ("Zip code (optional, defaults to location coordinates when location services are enabled)...") {
-               input "zipCode", "text", title: "Zip code", required: false
+               input "zipCode1", "text", title: "Zip code", required: false
        }
 }
 
@@ -146,7 +146,7 @@ def scheduleCheck() {
 }
 
 def astroCheck() {
-       def s = getSunriseAndSunset(zipCode: zipCode, sunriseOffset: sunriseOffset, sunsetOffset: sunsetOffset)
+       def s = getSunriseAndSunset(zipCode: zipCode1, sunriseOffset: sunriseOffset, sunsetOffset: sunsetOffset)
        state.riseTime = s.sunrise.time
        state.setTime = s.sunset.time
        log.debug "rise: ${new Date(state.riseTime)}($state.riseTime), set: ${new Date(state.setTime)}($state.setTime)"