Stricter time restrictions when updating history

This commit is contained in:
Gunnar Skjold
2026-03-15 09:33:14 +01:00
parent 3d128f5e20
commit 9e24395681

View File

@@ -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);