From e7fc50497573f11b72a39e1953d5e0a5edceb683 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sat, 26 Mar 2022 09:45:35 +0100 Subject: [PATCH] Fixed prices that are not cleared after midnight? --- src/mqtt/RawMqttHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mqtt/RawMqttHandler.cpp b/src/mqtt/RawMqttHandler.cpp index 37db447e..e79bcc1a 100644 --- a/src/mqtt/RawMqttHandler.cpp +++ b/src/mqtt/RawMqttHandler.cpp @@ -104,6 +104,7 @@ bool RawMqttHandler::publishPrices(EntsoeApi* eapi) { int8_t min1hrIdx = -1, min3hrIdx = -1, min6hrIdx = -1; float min = INT16_MAX, max = INT16_MIN; float values[34] = {0}; + memset(values, ENTSOE_NO_VALUE, 34); for(uint8_t i = 0; i < 34; i++) { float val = eapi->getValueForHour(now, i); values[i] = val;