1 //Create a class for button
3 import SmartThing.SmartThing
5 public class Button extends SmartThing {
6 // id, label, and display name of the device
10 // Possible values for eventsSince method
11 List<String> possibleValues = new ArrayList<String>();
13 Button(Closure sendEvent, String id, String label, String displayName) {
15 labelSmartThing = label
16 displayNameSmartThing = displayName
17 sendEventSmartThings = sendEvent
18 possibleValuesSmartThings = possibleValues
23 this.displayName = displayName
24 possibleValues.add("held")
25 possibleValues.add("pushed")