First implementation of energy accounting

This commit is contained in:
Gunnar Skjold
2022-01-21 17:37:23 +01:00
parent e4d4753181
commit a72f02a779
11 changed files with 336 additions and 14 deletions

View File

@@ -38,12 +38,12 @@ char* EntsoeApi::getCurrency() {
return this->config->currency;
}
float EntsoeApi::getValueForHour(uint8_t hour) {
float EntsoeApi::getValueForHour(int8_t hour) {
time_t cur = time(nullptr);
return getValueForHour(cur, hour);
}
float EntsoeApi::getValueForHour(time_t cur, uint8_t hour) {
float EntsoeApi::getValueForHour(time_t cur, int8_t hour) {
tmElements_t tm;
if(tz != NULL)
cur = tz->toLocal(cur);

View File

@@ -26,8 +26,8 @@ public:
char* getToken();
char* getCurrency();
float getValueForHour(uint8_t);
float getValueForHour(time_t, uint8_t);
float getValueForHour(int8_t);
float getValueForHour(time_t, int8_t);
private:
RemoteDebug* debugger;