From fdfa6c1b529005c4f01aee97c1b44009e2d400dd Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Thu, 1 Jan 2026 20:07:48 +0100 Subject: [PATCH] Fixed MQTT JSON for prices (#1116) --- lib/JsonMqttHandler/src/JsonMqttHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/JsonMqttHandler/src/JsonMqttHandler.cpp b/lib/JsonMqttHandler/src/JsonMqttHandler.cpp index 1e558784..05d7d2e3 100644 --- a/lib/JsonMqttHandler/src/JsonMqttHandler.cpp +++ b/lib/JsonMqttHandler/src/JsonMqttHandler.cpp @@ -431,7 +431,7 @@ bool JsonMqttHandler::publishPrices(PriceService* ps) { } pos--; - pos += snprintf_P(json+pos, BufferSize-pos, PSTR("],\"min\":%.4f,\"max\":%.4f,\"cheapest1hr\":\"%s\",\"cheapest3hr\":\"%s\",\"cheapest6hr\":\"%s\"}}"), + pos += snprintf_P(json+pos, BufferSize-pos, PSTR("],\"min\":%.4f,\"max\":%.4f,\"cheapest1hr\":%s,\"cheapest3hr\":%s,\"cheapest6hr\":%s}}"), min == INT16_MAX ? 0.0 : min, max == INT16_MIN ? 0.0 : max, ts1hr,