//Create a class for step sensor package StepSensor import SmartThing.SmartThings public class StepSensors extends SmartThings { List stepSensors = new ArrayList() StepSensors(Closure sendEvent, boolean init) { // Only initialize one time since we only have one device for each capability stepSensors = smartThings // Initialization String id = "stepSensorID0" String label = "steps" String displayName = "stepSensor" Integer steps Integer goal if (init) { goal = 50 steps = 35 } else { goal = 40 steps = 60 } stepSensors.add(new StepSensor(sendEvent, id, label, displayName, steps, goal)) } }