private String sleeping = "sleeping"
- SleepSensors(Closure sendEvent, int deviceNumbers) {
+ SleepSensors(Closure sendEvent, int deviceNumbers, boolean init) {
this.sendEvent = sendEvent
this.deviceNumbers = deviceNumbers
this.sleepSensors = []
+ if (init) {
+ this.sleeping = "sleeping"
+ } else {
+ this.sleeping = "not sleeping"
+ }
sleepSensors.add(new SleepSensor(id, label, displayName, this.sleeping))
}