From b237d49ae6b5a4666eaef8401cba56983fe12b86 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 6 Feb 2022 09:54:32 +0100 Subject: [PATCH] Fix initial energy setting --- tasmota/xdrv_86_esp32_sonoff_spm.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xdrv_86_esp32_sonoff_spm.ino b/tasmota/xdrv_86_esp32_sonoff_spm.ino index 6eb17826b..af578c02c 100644 --- a/tasmota/xdrv_86_esp32_sonoff_spm.ino +++ b/tasmota/xdrv_86_esp32_sonoff_spm.ino @@ -1144,7 +1144,7 @@ void SSPMHandleReceivedData(void) { } // If received daily energy is below last daily energy then update total energy // This happens around midnight in normal situations - else if (Sspm->energy_today[module][channel] < last_energy_today) { + if (Sspm->energy_today[module][channel] < last_energy_today) { Sspm->Settings.energy_yesterday[module][channel] = last_energy_today; // Daily save Sspm->Settings.energy_total[module][channel] += last_energy_today; // Daily incremental save if (Settings->save_data) {