From 5c7b06ff86f85637683f65edabf2b953a822fcb2 Mon Sep 17 00:00:00 2001 From: Gilles Grandou Date: Fri, 10 May 2024 18:50:33 +0200 Subject: [PATCH] fixup empty MQTT message --- pool.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pool.js b/pool.js index 355ab3d..73198b8 100644 --- a/pool.js +++ b/pool.js @@ -295,7 +295,10 @@ MQTT.subscribe( "zigbee2mqtt/Piscine", function (topic, msg) { status.tick_mqtt++; - print("[POOL] mqtt", topic); + print("[POOL] mqtt", topic, msg); + if (msg == "") { + return; + } let obj = JSON.parse(msg); if (obj.temperature === undefined) { return;