From 9f26068b7d01d4a48f327097abeb5a2365deffcc Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 9 Sep 2020 10:49:04 +0200 Subject: [PATCH] Fix HLW8012 related total energy counters Fix HLW8012 related total energy counters (#9263, #9266) --- tasmota/xnrg_01_hlw8012.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xnrg_01_hlw8012.ino b/tasmota/xnrg_01_hlw8012.ino index 40d3e4185..dfc536672 100644 --- a/tasmota/xnrg_01_hlw8012.ino +++ b/tasmota/xnrg_01_hlw8012.ino @@ -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.energy_period_counter = 0; 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(); } }