This commit is contained in:
Koen Kanters 2019-04-09 19:17:16 +02:00
parent 78ff9b1937
commit 811692fed8

View File

@ -90,13 +90,13 @@ class DeviceAvailability {
}, mechanism); }, mechanism);
} }
setTimer(ieeeAddr) { setTimer(device) {
if (this.timers[ieeeAddr]) { if (this.timers[device.ieeeAddr]) {
clearTimeout(this.timers[ieeeAddr]); clearTimeout(this.timers[device.ieeeAddr]);
} }
this.timers[ieeeAddr] = setTimeout(() => { this.timers[device.ieeeAddr] = setTimeout(() => {
this.handleInterval(ieeeAddr); this.handleInterval(device);
}, utils.secondsToMilliseconds(this.availability_timeout)); }, utils.secondsToMilliseconds(this.availability_timeout));
} }