fixup empty MQTT message

This commit is contained in:
Gilles Grandou 2024-05-10 18:50:33 +02:00
parent 0971368482
commit 5c7b06ff86

View File

@ -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;