1 //Create a class for sleep sensor
3 import Timer.SimulatedTimer
5 public class SleepSensor {
8 private String displayName
9 private String sleeping
11 SleepSensor(String id, String label, String displayName, String sleeping) {
14 this.displayName = displayName
15 this.sleeping = sleeping
19 def setValue(String value) {
20 println("the sleeping state is changed to $value!")