Update auto-humidity-vent.groovy
[smartapps.git] / official / beacon-control.groovy
index 007b45560a8a64f915dda217013b8961bb261e8a..06fbd92d4830f0f1175ccfb309db1449ab35f62e 100755 (executable)
@@ -24,14 +24,14 @@ definition(
 )
 
 preferences {
-       page(name: "mainPage")
-       
        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: "mainPage")
 }
 
 def mainPage() {
@@ -254,7 +254,8 @@ private hideOptionsSection() {
 }
 
 private getAllOk() {
-       modeOk && daysOk && timeOk
+       //modeOk && daysOk && timeOk
+       return true
 }
 
 private getModeOk() {
@@ -303,15 +304,6 @@ private timeIntervalLabel() {
        (starting && ending) ? hhmm(starting) + "-" + hhmm(ending, "h:mm a z") : ""
 }
 
-private list(List names) {
-       switch (names.size()) {
-               case 0:
-                       return null
-               case 1:
-                       return names[0]
-               case 2:
-                       return "${names[0]} and ${names[1]}"
-               default:
-                       return "${names[0..-2].join(', ')}, and ${names[-1]}"
-       }
+private list(Object names) {
+       return names[0]
 }