Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
[smartthings-infrastructure.git] / SmokeDetector / SmokeDetectors.groovy
index d2a9290744b79363fe8fb92b1b6037fd461aaa0a..2c09a20b43326b9a933dacf4634601733bd742f3 100644 (file)
@@ -21,6 +21,7 @@ public class SmokeDetectors {
        private String currentCarbonMonoxideValue = "clear"
        private String carbonMonoxideLatestValue = "clear"
        private int battery = 50
+        private int batteryValue = 50
        private int batteryLatestValue = 50
 
                
@@ -29,12 +30,8 @@ public class SmokeDetectors {
                this.deviceNumbers = deviceNumbers
                this.smokeDetectors = []
 
-               def initBattery = Verify.getIntFromList(30, 50, 70)
-               this.battery = initBattery
-               this.batteryLatestValue = initBattery
-
-               def initSmoke = Verify.getInt(0,2)
-               if (initSmoke == 0) {
+               /*def init = Verify.getInt(0,2)
+               if (init == 0) {
                        this.currentSmokeValue = "clear"
                        this.smokeLatestValue = "clear"
                } else if (initSmoke == 1) {
@@ -56,8 +53,8 @@ public class SmokeDetectors {
                        this.currentCarbonMonoxideValue = "tested"
                        this.carbonMonoxideLatestValue = "tested"               
                }
-               smokeDetectors.add(new SmokeDetector(id, label, displayName, this.currentSmokeValue, this.smokeLatestValue, this.currentCarbonMonoxideValue,
-                                                     this.carbonMonoxideLatestValue, this.battery))
+               }*/
+               smokeDetectors.add(new SmokeDetector(id, label, displayName, this.currentSmokeValue, this.smokeLatestValue, this.carbonMonoxide, this.carbonMonoxideLatestValue, this.battery))
        }
 
        //By Model Checker