Changing Verify API call scheme for device handlers.
[smartthings-infrastructure.git] / ColorTemperature / ColorTemperatures.groovy
index 99fe7e6a22f752794f3da630ebac18d2e2c87c99..d3826804318a6448eff9382233a52bfd1b0043e3 100644 (file)
@@ -2,9 +2,6 @@
 package ColorTemperature
 import Timer.SimulatedTimer
 
-//JPF's Verify API
-import gov.nasa.jpf.vm.Verify
-
 public class ColorTemperatures {
        private int deviceNumbers
        private List colorTemperatues
@@ -20,21 +17,20 @@ public class ColorTemperatures {
        private int colorTemperature = 15000
        
 
-       ColorTemperatures(Closure sendEvent, int deviceNumbers) {
+       ColorTemperatures(Closure sendEvent, int deviceNumbers, boolean init) {
                this.sendEvent = sendEvent
                this.deviceNumbers = deviceNumbers
                this.colorTemperatues = []
 
-               /*def initLevel = Verify.getIntFromList(50, 70)
-               this.level = initLevel 
-               def initTemp = Verify.getIntFromList(10000, 15000)
-               this.colorTemperature = initTemp 
-               def init = Verify.getBoolean()
                if (init) {
-                       this.currentSwitch = "off"
+                       this.level = 30
+                       this.currentLevel = 40
+                       this.colorTemperature = 10000
                } else {
-                       this.currentSwitch = "on"
-               }*/
+                       this.level = 50
+                       this.currentLevel = 50
+                       this.colorTemperature = 15000
+               }
 
                colorTemperatues.add(new ColorTemperature(sendEvent, id, label, displayName, this.level, this.currentSwitch, this.colorTemperature))
        }