Removing getXXX methods + properties. Adding getProperty feature to SmartThing(s)
[smartthings-infrastructure.git] / BeaconSensor / BeaconSensors.groovy
1 //Create a class for beacon sensor
2 package BeaconSensor
3 import SmartThing.SmartThings
4
5 public class BeaconSensors extends SmartThings {
6         List beaconSensors = new ArrayList()
7
8         BeaconSensors(Closure sendEvent, boolean init) {
9                 beaconSensors = smartThings
10
11                 // Initialization
12                 String id = "beaconID0"
13                 String label = "beacon"
14                 String displayName = "beaconSensor"
15                 String presence
16
17                 if (init)
18                         presence = "not present"
19                 else
20                         presence = "present"
21
22                 beaconSensors.add(new BeaconSensor(sendEvent, id, label, displayName, presence))
23         }
24 }