From bd7d0be07a474fe2d7052e62e094212d8050cb2a Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Mon, 2 Nov 2020 18:27:06 +0100 Subject: [PATCH] Clear device state when device leaves network. https://github.com/Koenkk/zigbee2mqtt/issues/4485 --- lib/controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/controller.js b/lib/controller.js index e452bd355..4a01ad11a 100644 --- a/lib/controller.js +++ b/lib/controller.js @@ -254,6 +254,7 @@ class Controller { /* istanbul ignore else */ if (type === 'deviceLeave') { logger.warn(`Device '${name || data.ieeeAddr}' left the network`); + this.state.remove(data.ieeeAddr); } }