1 //Create a class for step sensor
3 import SmartThing.SmartThings
5 public class StepSensors extends SmartThings {
6 List stepSensors = new ArrayList()
8 StepSensors(Closure sendEvent, boolean init) {
9 // Only initialize one time since we only have one device for each capability
10 stepSensors = smartThings
13 String id = "stepSensorID0"
14 String label = "steps"
15 String displayName = "stepSensor"
27 stepSensors.add(new StepSensor(sendEvent, id, label, displayName, steps, goal))