- //Methods for closures
- def count(Closure Input) {
- motionSensors.count(Input)
- }
- def size() {
- motionSensors.size()
- }
- def each(Closure Input) {
- motionSensors.each(Input)
- }
- def find(Closure Input) {
- motionSensors.find(Input)
- }
- def sort(Closure Input) {
- motionSensors.sort(Input)
- }
- def collect(Closure Input) {
- motionSensors.collect(Input)
- }
-
- def currentState(String deviceFeature) {
- currentValue(deviceFeature)
- }
-
- def currentValue(String deviceFeature) {
- motionSensors[0].currentValue(deviceFeature)//It is called if we have only one device
- }
-
- def latestValue(String deviceFeature) {
- motionSensors[0].latestValue(deviceFeature)//It is called if we have only one device
- }
-
- def statesSince(String info, Date dateObj) {
- return motionSensors[0].statesSince()
- }