From 21998a3e7492f16ab6dff1285bf1ce23294fd218 Mon Sep 17 00:00:00 2001 From: sondresjolyst Date: Wed, 18 Dec 2024 12:18:53 +0100 Subject: [PATCH] feat: clearDiscoveredDevices on mqtt connect --- lib/liz | 2 +- src/MQTTHelper.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/liz b/lib/liz index 4af9d5e..1d43289 160000 --- a/lib/liz +++ b/lib/liz @@ -1 +1 @@ -Subproject commit 4af9d5e5a634e73512c098698d37172182ef4b99 +Subproject commit 1d432897cc5b43a96ddb6e0a1b0b52167ac7ea77 diff --git a/src/MQTTHelper.h b/src/MQTTHelper.h index 41aade9..b9718ef 100644 --- a/src/MQTTHelper.h +++ b/src/MQTTHelper.h @@ -248,6 +248,8 @@ void connectToMQTT() Serial.println(""); Serial.println("MQTT connected"); + liz::clearDiscoveredDevices(); + if (strcmp(LIZ_TYPE, "sensor") == 0) { sendMQTTTemperatureDiscoveryMsg(MQTT_STATETOPIC, MQTT_HOSTNAME);