mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 19:26:37 +00:00
Fix HLW8012 related total energy counters
Fix HLW8012 related total energy counters (#9263, #9266)
This commit is contained in:
parent
ff3d0703d2
commit
9f26068b7d
@ -208,7 +208,7 @@ void HlwEverySecond(void)
|
|||||||
hlw_len = 10000 * 1000 / Hlw.energy_period_counter; // Add *1000 to fix rounding on loads at 3.6kW (#9160)
|
hlw_len = 10000 * 1000 / Hlw.energy_period_counter; // Add *1000 to fix rounding on loads at 3.6kW (#9160)
|
||||||
Hlw.energy_period_counter = 0;
|
Hlw.energy_period_counter = 0;
|
||||||
if (hlw_len) {
|
if (hlw_len) {
|
||||||
Energy.kWhtoday_delta += ((Hlw.power_ratio * Settings.energy_power_calibration) * 1000 / hlw_len) / 36;
|
Energy.kWhtoday_delta += (((Hlw.power_ratio * Settings.energy_power_calibration) / 36) * 1000) / hlw_len;
|
||||||
EnergyUpdateToday();
|
EnergyUpdateToday();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user