//Create a class for button package Button import SmartThing.SmartThings public class Buttons extends SmartThings { List buttons = new ArrayList() Buttons(Closure sendEvent) { buttons = smartThings // Initialization String id = "buttonID0" String label = "button" String displayName = "buttonController" buttons.add(new Button(sendEvent, id, label, displayName)) } }