Updating classes with Verify API.
[smartthings-infrastructure.git] / SleepSensor / SleepSensors.groovy
index 269a419e2212b28945b4514ec31cd91e0e0a9f7f..9c49eb9bc0dfdc68d384c55ce9d4ee796d7130e5 100644 (file)
@@ -2,6 +2,9 @@
 package SleepSensor
 import Timer.SimulatedTimer
 
+//JPF's Verify API
+import gov.nasa.jpf.vm.Verify
+
 public class SleepSensors {
        private int deviceNumbers
        private List sleepSensors
@@ -19,6 +22,12 @@ public class SleepSensors {
                this.deviceNumbers = deviceNumbers
                this.sleepSensors = []
 
+               def init = Verify.getBoolean()
+               if (init) {
+                       this.sleeping = "sleeping"
+               } else {
+                       this.sleeping = "not sleeping"
+               }
                sleepSensors.add(new SleepSensor(id, label, displayName, this.sleeping))
        }