1 //Create a class for momentory switch device
3 import SmartThing.SmartThings
5 public class Momentaries extends SmartThings {
6 List momentaries = new ArrayList()
8 Momentaries(Closure sendEvent) {
9 // Only initialize one time since we only have one device for each capability
10 momentaries = smartThings
13 StringBuilder id = new StringBuilder("momentaryID0")
14 StringBuilder label = new StringBuilder("momentary")
15 StringBuilder displayName = new StringBuilder("momentary0")
17 momentaries.add(new Momentary(sendEvent, id, label, displayName))
20 // Methods to set values