Infrastruction modification
[smartthings-infrastructure.git] / Button / Buttons.groovy
1 //Create a class for button
2 package Button
3 import SmartThing.SmartThings
4
5 public class Buttons extends SmartThings {
6         List buttons = new ArrayList()
7                 
8         Buttons(Closure sendEvent) {
9                 buttons = smartThings
10
11                 // Initialization
12                 StringBuilder id = new StringBuilder("buttonID0")
13                 StringBuilder label = new StringBuilder("button")
14                 StringBuilder displayName = new StringBuilder("button0")
15
16                 buttons.add(new Button(sendEvent, id, label, displayName))
17         }
18 }