Update vacation-lighting-director.groovy
[smartapps.git] / official / vacation-lighting-director.groovy
index c3187b743e3d94e36d5ded3652adf76c5749a6a5..feab8212eadbe0f1131a788a2dceee3cbf6c1fc5 100755 (executable)
@@ -37,11 +37,10 @@ definition(
 )
 
 preferences {
-    page name:"pageSetup"
-    page name:"Setup"
-    page name:"Settings"
     page name: "timeIntervalInput"
-
+    page name:"Settings1"
+    page name:"Setup"
+    page name:"pageSetup"
 }
 
 // Show setup page
@@ -62,7 +61,7 @@ def pageSetup() {
         }
         section("Setup Menu") {
             href "Setup", title: "Setup", description: "", state:greyedOut()
-            href "Settings", title: "Settings", description: "", state: greyedOutSettings()
+            href "Settings1", title: "Settings1", description: "", state: greyedOutSettings()
             }
         section([title:"Options", mobileOnly:true]) {
             label title:"Assign a name", required:false
@@ -134,7 +133,7 @@ def Setup() {
 }
 
 // Show "Setup" page
-def Settings() {
+def Settings1() {
 
     def falseAlarmThreshold = [
         name:       "falseAlarmThreshold",
@@ -151,11 +150,11 @@ def Settings() {
         options: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
     ]
     
-    def pageName = "Settings"
+    def pageName = "Settings1"
     
     def pageProperties = [
-        name:       "Settings",
-        title:      "Settings",
+        name:       "Settings1",
+        title:      "Settings1",
         nextPage:   "pageSetup"
     ]
     
@@ -258,7 +257,7 @@ def scheduleCheck(evt) {
             inactive_switches[random_int].on()
             
             // then remove that switch from the pool off switches that can be turned on
-            inactive_switches.remove(random_int)
+            //inactive_switches.remove(random_int)
         }
         
         // re-run again when the frequency demands it
@@ -292,7 +291,7 @@ def scheduleCheck(evt) {
 
 //below is used to check restrictions
 private getAllOk() {
-       modeOk && daysOk && timeOk && homeIsEmpty
+       modeOk && homeIsEmpty/*&& daysOk && timeOk*/
 }