Fixed tariff peaks on wrong date and time (#1159)

* Trying to fix tariff on wrong date. Also some code cleanup

* Fix issue for ex DLMS where accumulated is always included

* Stricter time restrictions when updating history

* Adjustments after testing
This commit is contained in:
Gunnar Skjold
2026-04-09 11:41:58 +02:00
committed by GitHub
parent 6011d3169e
commit 2c96b4d94f
14 changed files with 152 additions and 133 deletions

View File

@@ -7,8 +7,6 @@
#ifndef _ENERGYACCOUNTING_H
#define _ENERGYACCOUNTING_H
#include "Arduino.h"
#include "AmsData.h"
#include "AmsDataStorage.h"
#include "PriceService.h"
@@ -83,7 +81,7 @@ public:
void setPriceService(PriceService *ps);
void setTimezone(Timezone*);
EnergyAccountingConfig* getConfig();
bool update(AmsData* amsData);
bool update(time_t now, uint64_t lastUpdatedMillis, uint8_t listType, uint32_t activeImportPower, uint32_t activeExportPower);
bool load();
bool save();
bool isInitialized();