Koenkk / zigbee-herdsman

A Node.js Zigbee library
MIT License
454 stars 278 forks source link

Update last seen on network address events #1004

Closed deviantintegral closed 1 month ago

deviantintegral commented 1 month ago

Fixes https://github.com/Koenkk/zigbee2mqtt/issues/22043.

This wasn't directly caused by https://github.com/Koenkk/zigbee-herdsman/pull/992, but exposed by it because it caused the network address event to be emitted far more often. While the current code is emitting the event, it's not actually updating the last seen timestamp.

First a test, then I will push the fix to prove it actually is!

The whitespace errors could be pulled out to a separate PR - they get cleaned up automatically every time I save in my IDE, and also throw warnings when encountered during git checkout / stash operations.

Koenkk commented 1 month ago

Thanks!