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
7 StringBuilder id = new StringBuilder()
8 StringBuilder label = new StringBuilder()
9 StringBuilder displayName = new StringBuilder()
11 Touched(Closure sendEvent) {
13 labelSmartThing = label
14 displayNameSmartThing = displayName
15 sendEventSmartThings = sendEvent
18 id.append("appTouchID0")
19 label.append("appTouch")
20 displayName.append("appTouch0")