Fix ESP32 energy monitoring set StartTotalTime

Fix ESP32 energy monitoring set StartTotalTime regression from v12.3.1.5 (#18385)
This commit is contained in:
Theo Arends 2023-04-14 17:42:31 +02:00
parent e07efd625f
commit c2a6dd81e8
5 changed files with 4 additions and 5 deletions

View File

@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- ESP32 ``Upload``, ``Upgrade``, ``WebGetConfig``, ``WebQuery`` and ``WebSend`` random HTTP(S) connection timeout set to 5 sec (commit 542eca3)
- ESP32 energy monitoring set StartTotalTime regression from v12.3.1.5 (#18385)
### Removed

View File

@ -153,3 +153,4 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Refactor energy monitoring reducing stack usage and solve inherent exceptions and watchdogs [#18164](https://github.com/arendst/Tasmota/issues/18164)
- ESP32 ``Upload``, ``Upgrade``, ``WebGetConfig``, ``WebQuery`` and ``WebSend`` random HTTP(S) connection timeout set to 5 sec (commit 542eca3)
- ESP32 energy period shows kWh value instead of Wh regression from v12.3.1.5 [#15856](https://github.com/arendst/Tasmota/issues/15856)
- ESP32 energy monitoring set StartTotalTime regression from v12.3.1.5 [#18385](https://github.com/arendst/Tasmota/issues/18385)

View File

@ -186,9 +186,6 @@ String GetDateAndTime(uint8_t time_type) {
}
time = Rtc.restart_time;
break;
case DT_ENERGY:
time = Settings->energy_kWhtotal_time;
break;
case DT_BOOTCOUNT:
time = Settings->bootcount_reset_time;
break;

View File

@ -1260,7 +1260,7 @@ void EnergyShow(bool json) {
bool show_energy_period = (0 == TasmotaGlobal.tele_period);
ResponseAppend_P(PSTR(",\"" D_RSLT_ENERGY "\":{\"" D_JSON_TOTAL_START_TIME "\":\"%s\",\"" D_JSON_TOTAL "\":%s"),
GetDateAndTime(DT_ENERGY).c_str(),
GetDT(Settings->energy_kWhtotal_time).c_str(),
EnergyFmt(Energy->total, Settings->flag2.energy_resolution, 2));
if (energy_tariff) {

View File

@ -1494,7 +1494,7 @@ void EnergyShow(bool json) {
bool show_energy_period = (0 == TasmotaGlobal.tele_period);
ResponseAppend_P(PSTR(",\"" D_RSLT_ENERGY "\":{\"" D_JSON_TOTAL_START_TIME "\":\"%s\",\"" D_JSON_TOTAL "\":%s"),
GetDateAndTime(DT_ENERGY).c_str(),
GetDT(Energy->Settings.energy_kWhtotal_time).c_str(),
EnergyFmt(Energy->total, Settings->flag2.energy_resolution, 2));
if (energy_tariff) {