Adding another value for illuminance measurement event.
[smartthings-infrastructure.git] / BeaconSensor / BeaconSensors.groovy
index a36a4a487f9c536752ac0d9af9ca2de4459007b7..4550965ad876a28d4c30425ee5fb257a4914d145 100644 (file)
@@ -2,9 +2,6 @@
 package BeaconSensor
 import Timer.SimulatedTimer
 
-//JPF's Verify API
-import gov.nasa.jpf.vm.Verify
-
 public class BeaconSensors {
        private int deviceNumbers
        private List beaconSensors
@@ -19,17 +16,18 @@ public class BeaconSensors {
        private String presenceLatestValue = "not present"
 
                
-       BeaconSensors(Closure sendEvent, int deviceNumbers) {
+       BeaconSensors(Closure sendEvent, int deviceNumbers, boolean init) {
                this.sendEvent = sendEvent              
                this.deviceNumbers = deviceNumbers
                this.beaconSensors = []
 
-               def init = Verify.getBoolean()
                if (init) {
                        this.presence = "not present"
+                       this.currentPresence = "not present"
                        this.presenceLatestValue = "not present"
                } else {
                        this.presence = "present"
+                       this.currentPresence = "present"
                        this.presenceLatestValue = "present"
                }
                beaconSensors.add(new BeaconSensor(id, label, displayName, this.presence, this.presenceLatestValue))