preferences
{
- page(name: "configurations")
- page(name: "options")
-
page(name: "timeIntervalInput", title: "Only during a certain time...")
{
section
{
input "starting", "time", title: "Starting", required: false
input "ending", "time", title: "Ending", required: false
- }
}
+ }
+
+ page(name: "configurations")
+ page(name: "options")
+
+
}
def configurations()
}
section ("Zip code (optional, defaults to location coordinates when location services are enabled)...")
{
- input "zipCode", "text", title: "Zip Code?", required: false, description: "Local Zip Code"
+ input "zipCodeText", "text", title: "Zip Code?", required: false, description: "Local Zip Code"
}
}
}
}
section ("Zip code (optional, defaults to location coordinates when location services are enabled)...")
{
- input "zipCode", "text", title: "Zip Code?", required: false, description: "Local Zip Code"
+ input "zipCodeText", "text", title: "Zip Code?", required: false, description: "Local Zip Code"
}
}
}
def astroCheck()
{
- def s = getSunriseAndSunset(zipCode: zipCode, sunriseOffset: sunriseOffset, sunsetOffset: sunsetOffset)
+ def s = getSunriseAndSunset(zipCode: zipCodeText, sunriseOffset: sunriseOffset, sunsetOffset: sunsetOffset)
state.riseTime = s.sunrise.time
state.setTime = s.sunset.time
log.debug "Sunrise: ${new Date(state.riseTime)}($state.riseTime), Sunset: ${new Date(state.setTime)}($state.setTime)"
private getAllOk()
{
- modeOk && daysOk && timeOk
+ return true//modeOk //&& daysOk && timeOk
}
private getModeOk()