Handle plain unlock
[smartthings-infrastructure.git] / Button / Buttons.groovy
index 423b9569fdb44a6a9a1a1cda6fcfbb118e891920..f15a30072aeee0f4033dd80e65ee454cb4542a9f 100644 (file)
@@ -2,9 +2,6 @@
 package Button
 import Timer.SimulatedTimer
 
-//JPF's Verify API
-import gov.nasa.jpf.vm.Verify
-
 public class Buttons {
        private int deviceNumbers
        private List buttons
@@ -18,11 +15,16 @@ public class Buttons {
        private int numberOfButtons = 4
        
                
-       Buttons(Closure sendEvent, int deviceNumbers) {
+       Buttons(Closure sendEvent, int deviceNumbers, boolean init) {
                this.sendEvent = sendEvent              
                this.deviceNumbers = deviceNumbers
                this.buttons = []
 
+               if (init) {
+                       this.button = "pushed"
+               } else {
+                       this.button = "held"
+               }
                buttons.add(new Button(id, label, displayName, button, numberOfButtons))
        }