mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 18:39:09 -07:00
Fix device availability. https://github.com/Koenkk/zigbee2mqtt/issues/1395
This commit is contained in:
parent
78ff9b1937
commit
811692fed8
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user