1 //Create a class for switch device
3 import SmartThing.SmartThings
5 public class Switches extends SmartThings {
6 List switches = new ArrayList()
8 Switches(Closure sendEvent, boolean init) {
12 String id = "switchID0"
13 String label = "switch"
14 String displayName = "switch"
22 switches.add(new Switch(sendEvent, id, label, displayName, currentSwitch))
25 // Methods to set values
30 def on(LinkedHashMap metaData) {
38 def off(LinkedHashMap metaData) {