mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-03 02:21:38 +00:00
Fix device availability. https://github.com/Koenkk/zigbee2mqtt/issues/1395
This commit is contained in:
@@ -84,13 +84,13 @@ class DeviceAvailability {
|
||||
}, mechanism);
|
||||
}
|
||||
|
||||
setTimer(ieeeAddr) {
|
||||
if (this.timers[ieeeAddr]) {
|
||||
clearTimeout(this.timers[ieeeAddr]);
|
||||
setTimer(device) {
|
||||
if (this.timers[device.ieeeAddr]) {
|
||||
clearTimeout(this.timers[device.ieeeAddr]);
|
||||
}
|
||||
|
||||
this.timers[ieeeAddr] = setTimeout(() => {
|
||||
this.handleInterval(ieeeAddr);
|
||||
this.timers[device.ieeeAddr] = setTimeout(() => {
|
||||
this.handleInterval(device);
|
||||
}, utils.secondsToMilliseconds(this.availability_timeout));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user