From 7afe8bb10a857deaab53ee4e28807a5b266543e9 Mon Sep 17 00:00:00 2001 From: DutchmanNL Date: Fri, 3 Nov 2023 16:29:54 +0100 Subject: [PATCH] missed 1 function in previous commit for device cleanup --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index feeb78a..79620d5 100644 --- a/main.js +++ b/main.js @@ -1346,6 +1346,7 @@ class Esphome extends utils.Adapter { this.log.info(`Online state ${JSON.stringify(online)}`); if (!online || !online.val){ this.log.info(`Offline device ${knownDevices[device]._id.split('.')[2]} expected on ip ${knownDevices[device].native.ip} removed`); + this.deleteDevice(knownDevices[device]._id); } }