From 9e24395681b229ec356cfee72e3c2d83143abb23 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sun, 15 Mar 2026 09:33:14 +0100 Subject: [PATCH] Stricter time restrictions when updating history --- src/AmsToMqttBridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AmsToMqttBridge.cpp b/src/AmsToMqttBridge.cpp index bdddb396..30750c72 100644 --- a/src/AmsToMqttBridge.cpp +++ b/src/AmsToMqttBridge.cpp @@ -1590,14 +1590,14 @@ void handleDataSuccess(AmsData* data) { debugD_P(PSTR("READY to update (internal clock %02d:%02d:%02d UTC, meter clock: %02d:%02d:%02d, list type %d, est: %d, using clock: %d)"), tm.Hour, tm.Minute, tm.Second, mtm.Hour, mtm.Minute, mtm.Second, data->getListType(), wasCounterEstimated, dataUpdateTime == now); tmElements_t dtm; breakTime(dataUpdateTime, dtm); - if(dtm.Minute < 2 && data->getListType() >= 3) { + if(dtm.Minute < 1 && data->getListType() >= 3) { debugD_P(PSTR("Updating data storage using actual data")); saveData = ds.update(data, dataUpdateTime); #if defined(_CLOUDCONNECTOR_H) if(saveData && cloud != NULL) cloud->forceUpdate(); #endif - } else if(dtm.Minute == 2) { + } else if(dtm.Minute == 1) { debugW_P(PSTR("Did not receive necessary data for previous hour, clearing")); AmsData nullData; saveData = ds.update(&nullData, dataUpdateTime);