1 //Create a class for smoke detector
3 import SmartThing.SmartThings
5 public class SmokeDetectors extends SmartThings {
6 List smokeDetectors = new ArrayList()
8 SmokeDetectors(Closure sendEvent, boolean init) {
9 // Only initialize one time since we only have one device for each capability
10 smokeDetectors = smartThings
13 String id = "smokeDetectorID0"
14 String label = "smoke"
15 String displayName = "smokeDetector"
23 smokeDetectors.add(new SmokeDetector(sendEvent, id, label, displayName, smoke))