From d1c7ee882b228b43c1e385452fbdd20a5a748fd6 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 17 Nov 2022 14:58:16 +0100 Subject: [PATCH] Reset energy today at midnight (#16791) --- tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino index ba8ca1c53..6621eee9b 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino @@ -365,6 +365,8 @@ void Energy200ms(void) Energy.kWhtoday[i] = 0; Energy.kWhtoday_offset[i] = 0; RtcSettings.energy_kWhtoday_ph[i] = 0; + Settings->energy_kWhtoday_ph[i] = 0; + Energy.start_energy[i] = 0; // Energy.kWhtoday_delta = 0; // dont zero this, we need to carry the remainder over to tomorrow Energy.daily_sum_import_balanced = 0.0;