mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-25 12:09:53 +00:00
Attempt to fix lastSeen incorrect leading to incorrect offline state. #3650
This commit is contained in:
@@ -95,12 +95,12 @@ class Availability extends Extension {
|
||||
}
|
||||
|
||||
async handleIntervalNotPingable(device) {
|
||||
const ago = Date.now() - device.lastSeen;
|
||||
const resolvedEntity = this.zigbee.resolveEntity(device.ieeeAddr);
|
||||
if (!resolvedEntity || !device.lastSeen) {
|
||||
return;
|
||||
}
|
||||
|
||||
const ago = Date.now() - resolvedEntity.device.lastSeen;
|
||||
logger.debug(`Non-pingable device '${resolvedEntity.name}' was last seen '${ago / 1000}' seconds ago.`);
|
||||
|
||||
if (ago > Hours25) {
|
||||
|
||||
Reference in New Issue
Block a user