1 //Create a class for image capture sensor
3 import SmartThing.SmartThings
5 public class ImageCaptures extends SmartThings {
6 List imageCaptureSensors = new ArrayList()
8 ImageCaptures(Closure sendEvent, boolean init) {
9 // Only initialize one time since we only have one device for each capability
10 imageCaptureSensors = smartThings
13 String id = "imageCaptureID0"
14 String label = "imageCapture"
15 String displayName = "imageCapturer"
16 String image = "image0"
18 imageCaptureSensors.add(new ImageCapture(sendEvent, id, label, displayName, image))
22 imageCaptureSensors[0].take()
25 def take(LinkedHashMap metaData) {