diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 05877845e9c7..7a1163b8850a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -61,6 +61,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c - Change White blend mode to using command ``SetOption 105`` instead of ``RGBWWTable`` - Fix ESP32 PWM range - Fix display power control (#9114) +- Fix energy total counters (#9263, #9266) - Add command ``SetOption102 0/1`` to set Baud rate for Teleinfo communication (0 = 1200 or 1 = 9600) - Add command ``SetOption103 0/1`` to set TLS mode when TLS is selected - Add command ``SetOption104 1`` to disable all MQTT retained messages diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index 964476d4d0dd..1e4fe022cb17 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -8,6 +8,7 @@ ### 8.4.0.3 20200823 +- Fix energy total counters (#9263, #9266) - Change references from http://thehackbox.org/tasmota/ to http://ota.tasmota.com/tasmota/ - Add command ``PowerDelta1`` to ``PowerDelta3`` to trigger on up to three phases (#9134) - Add Zigbee web ui widget for Lights diff --git a/tasmota/xnrg_01_hlw8012.ino b/tasmota/xnrg_01_hlw8012.ino index 40d3e4185603..4e73f0926afe 100644 --- a/tasmota/xnrg_01_hlw8012.ino +++ b/tasmota/xnrg_01_hlw8012.ino @@ -205,10 +205,10 @@ void HlwEverySecond(void) unsigned long hlw_len; if (Hlw.energy_period_counter) { - hlw_len = 10000 * 1000 / Hlw.energy_period_counter; // Add *1000 to fix rounding on loads at 3.6kW (#9160) + hlw_len = 10000 * 100 / Hlw.energy_period_counter; // Add *100 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) * 100) / hlw_len; EnergyUpdateToday(); } }