From 29c57a11e58faaf4f41573bf29ce25ae8d9f7f7d Mon Sep 17 00:00:00 2001 From: John Date: Sat, 5 Feb 2022 18:21:48 +0100 Subject: [PATCH] support static topic for non-JSON --- src/ebusd/mqtthandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ebusd/mqtthandler.cpp b/src/ebusd/mqtthandler.cpp index 6161a90f..6d58fadd 100755 --- a/src/ebusd/mqtthandler.cpp +++ b/src/ebusd/mqtthandler.cpp @@ -1692,6 +1692,8 @@ void MqttHandler::publishMessage(const Message* message, ostringstream* updates, if (m_staticTopic) { *updates << "\"circuit\":\"" << message->getCircuit() << "\",\"name\":\"" << message->getName() << "\",\"fields\":{"; } + } else { + *updates << message->getCircuit() << UI_FIELD_SEPARATOR << message->getName() << UI_FIELD_SEPARATOR; } result_t result = message->decodeLastData(false, nullptr, -1, outputFormat, updates); if (result != RESULT_OK) {