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 String id = "momentaryID0"
14 String label = "momentary"
15 String displayName = "momentaryDevice"
17 momentaries.add(new Momentary(sendEvent, id, label, displayName))
20 // Methods to set values