Skip to content

Commit 9e24395

Browse files
committed
Stricter time restrictions when updating history
1 parent 3d128f5 commit 9e24395

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AmsToMqttBridge.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,14 +1590,14 @@ void handleDataSuccess(AmsData* data) {
15901590
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);
15911591
tmElements_t dtm;
15921592
breakTime(dataUpdateTime, dtm);
1593-
if(dtm.Minute < 2 && data->getListType() >= 3) {
1593+
if(dtm.Minute < 1 && data->getListType() >= 3) {
15941594
debugD_P(PSTR("Updating data storage using actual data"));
15951595
saveData = ds.update(data, dataUpdateTime);
15961596

15971597
#if defined(_CLOUDCONNECTOR_H)
15981598
if(saveData && cloud != NULL) cloud->forceUpdate();
15991599
#endif
1600-
} else if(dtm.Minute == 2) {
1600+
} else if(dtm.Minute == 1) {
16011601
debugW_P(PSTR("Did not receive necessary data for previous hour, clearing"));
16021602
AmsData nullData;
16031603
saveData = ds.update(&nullData, dataUpdateTime);

0 commit comments

Comments
 (0)