private int steps = 0
- StepSensors(Closure sendEvent, int deviceNumbers) {
+ StepSensors(Closure sendEvent, int deviceNumbers, boolean init) {
this.sendEvent = sendEvent
this.deviceNumbers = deviceNumbers
this.stepSensors = []
+ if (init) {
+ this.goal = 50
+ this.steps = 0
+ } else {
+ this.goal = 60
+ this.steps = 1
+ }
stepSensors.add(new StepSensor(id, label, displayName, this.steps, this.goal))
}
stepSensors[0].currentValue(deviceFeature)//It is called if we have only one device
}
+ def latestValue(String deviceFeature) {
+ stepSensors[0].currentValue(deviceFeature)//It is called if we have only one device
+ }
+
def getAt(int ix) {
stepSensors[ix]
}