diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino index baec24922247..32788aaff446 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino @@ -277,8 +277,14 @@ void EnergyUpdateToday(void) { if (abs(Energy->kWhtoday_delta[i]) > 1000) { int32_t delta = Energy->kWhtoday_delta[i] / 1000; delta_sum_balanced += delta; - Energy->kWhtoday_delta[i] -= (delta * 1000); - Energy->kWhtoday[i] += delta; + Energy->kWhtoday_delta[i] -= (delta * 1000); +#ifdef USE_ADE7880 + if (!Settings->flag3.hardware_energy_total || delta > 0) { // Import energy + Energy->kWhtoday[i] += delta; + } +#elif + Energy->kWhtoday[i] += delta; +#endif if (delta < 0) { // Export energy Energy->kWhtoday_export[i] += (delta *-1); if (Energy->kWhtoday_export[i] > 100) {