1 //Create a class for mobile presence
3 import SmartThing.SmartThings
5 public class MobilePresences extends SmartThings {
6 List mobilePresences = new ArrayList()
8 MobilePresences(Closure sendEvent) {
9 // Only initialize one time since we only have one device for each capability
10 mobilePresences = smartThings
13 String id = "mobileDeviceID0"
14 String label = "mobileDevice"
15 String displayName = "mobileDevice"
16 String deviceNetworkId = "mobile0"
18 mobilePresences.add(new MobilePresence(sendEvent, id, label, displayName, deviceNetworkId))