1 //Create a class for Touch sensor
3 import SmartThing.SmartThing
5 public class Touched extends SmartThing {
6 // id, label, and display name of the device
11 Touched(Closure sendEvent) {
14 displayName = "appTouchSensor"
17 labelSmartThing = label
18 displayNameSmartThing = displayName
19 sendEventSmartThings = sendEvent