Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
[smartthings-infrastructure.git] / StepSensor / StepSensor.groovy
index 4a408ad7cca45bd119ccccef1a76490b7c5f619e..6ec578fa7cad1ec1d66776e10788f46b6ff22478 100644 (file)
@@ -27,4 +27,18 @@ public class StepSensor {
                        this.goal = value.toInteger()
                }
        }
+
+       def currentValue(String deviceFeature) {
+               if (deviceFeature == "steps")
+                       return steps
+               else if (deviceFeature == "goal")
+                       return goal
+       }
+
+       def latestValue(String deviceFeature) {
+               if (deviceFeature == "steps")
+                       return steps
+               else if (deviceFeature == "goal")
+                       return goal
+       }
 }