//Create a class for button package Button import SmartThing.SmartThing public class Button extends SmartThing { // id, label, and display name of the device String id String label String displayName // Possible values for eventsSince method List possibleValues = new ArrayList(); Button(Closure sendEvent, String id, String label, String displayName) { idSmartThing = id labelSmartThing = label displayNameSmartThing = displayName sendEventSmartThings = sendEvent possibleValuesSmartThings = possibleValues // Initialization this.id = id this.label = label this.displayName = displayName possibleValues.add("held") possibleValues.add("pushed") } }