Added static HA content to progmem

This commit is contained in:
Gunnar Skjold
2022-02-22 21:33:50 +01:00
parent cbbb52d32a
commit 2ef1700cfe
5 changed files with 37 additions and 24 deletions

View File

@@ -106,6 +106,10 @@ bool EnergyAccounting::update(AmsData* amsData) {
if(debugger->isActive(RemoteDebug::VERBOSE)) debugger->printf("(EnergyAccounting) new threshold %d\n", currentThresholdIdx);
}
if(use > data.maxHour) {
data.maxHour = use; // Not really a good idea to use calculated value, but when you pass midnight and have the highest use at hour 23, it will not be included through 'calcDayUse'
}
return ret;
}