From: Seyed Amir Hossein Aqajari Date: Wed, 7 Aug 2019 01:22:02 +0000 (-0700) Subject: Update smart-nightlight.groovy X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8b2ca6d124ac55e77110b813a8aeda411e31b544;p=smartapps.git Update smart-nightlight.groovy --- diff --git a/official/smart-nightlight.groovy b/official/smart-nightlight.groovy index 53bc14c..ed407e7 100755 --- a/official/smart-nightlight.groovy +++ b/official/smart-nightlight.groovy @@ -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)"