From 7b0c2eea33357a9c79d4de3f16526bc89e4128ff Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Tue, 26 Sep 2023 20:12:24 +0200 Subject: [PATCH] Fixed realtime data update --- lib/EnergyAccounting/src/EnergyAccounting.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/EnergyAccounting/src/EnergyAccounting.cpp b/lib/EnergyAccounting/src/EnergyAccounting.cpp index 593a734f..00839bd7 100644 --- a/lib/EnergyAccounting/src/EnergyAccounting.cpp +++ b/lib/EnergyAccounting/src/EnergyAccounting.cpp @@ -58,6 +58,7 @@ bool EnergyAccounting::update(AmsData* amsData) { breakTime(tz->toLocal(now), local); if(!init) { + this->realtimeData->lastImportUpdateMillis = 0; this->realtimeData->currentHour = local.Hour; this->realtimeData->currentDay = local.Day; if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("(EnergyAccounting) Initializing data at %lu\n"), (int32_t) now); @@ -185,7 +186,7 @@ bool EnergyAccounting::update(AmsData* amsData) { this->realtimeData->incomeDay += income; } } - this->realtimeData-> lastExportUpdateMillis = amsData->getLastUpdateMillis(); + this->realtimeData->lastExportUpdateMillis = amsData->getLastUpdateMillis(); } if(config != NULL) {