Fix energy smart calculation at day roll-over

Fix energy smart calculation at day roll-over
This commit is contained in:
Theo Arends 2019-08-28 10:52:24 +02:00
parent 3a63ff3728
commit b52da68a68
1 changed files with 2 additions and 0 deletions

View File

@ -165,10 +165,12 @@ void Energy200ms(void)
Settings.energy_kWhtotal += Energy.kWhtoday;
RtcSettings.energy_kWhtotal = Settings.energy_kWhtotal;
Energy.kWhtoday = 0;
RtcSettings.energy_kWhtoday = 0;
Settings.energy_usage.usage1_kWhtotal += Energy.kWhtoday1;
RtcSettings.energy_usage.usage1_kWhtotal = Settings.energy_usage.usage1_kWhtotal;
Energy.kWhtoday1 = 0;
RtcSettings.energy_usage.usage1_kWhtoday = 0;
Energy.kWhtoday_delta = 0;
Energy.period = Energy.kWhtoday;