From ea60ef91943e732fb8d7b790b03d775623255698 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 17 Feb 2022 07:13:45 +0100 Subject: [PATCH] fix non-json payload prefix (fixes #535) --- src/ebusd/mqtthandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ebusd/mqtthandler.cpp b/src/ebusd/mqtthandler.cpp index de70fba2..48211b77 100755 --- a/src/ebusd/mqtthandler.cpp +++ b/src/ebusd/mqtthandler.cpp @@ -1777,7 +1777,7 @@ void MqttHandler::publishMessage(const Message* message, ostringstream* updates, *updates << "\"circuit\":\"" << message->getCircuit() << "\",\"name\":\"" << message->getName() << "\",\"fields\":{"; } - } else { + } else if (m_staticTopic) { *updates << message->getCircuit() << UI_FIELD_SEPARATOR << message->getName() << UI_FIELD_SEPARATOR; } result_t result = message->decodeLastData(false, nullptr, -1, outputFormat, updates);