This commit is contained in:
Theo Arends 2021-10-02 18:19:39 +02:00
parent 3b5172a5c0
commit 9002830d7c
2 changed files with 4 additions and 4 deletions

View File

@ -908,7 +908,7 @@ bool SetoptionDecode(uint32_t index, uint32_t *ptype, uint32_t *pindex) {
*ptype = 4;
*pindex = index -82; // 0 .. 31
}
else { // SetOption114 .. 145 = Settings->flag5
else { // SetOption114 .. 145 = Settings->flag5
*ptype = 5;
*pindex = index -114; // 0 .. 31
}

View File

@ -984,13 +984,13 @@ void EnergySnsInit(void)
if (TasmotaGlobal.energy_driver) {
// Update for split phase totals (v9.5.0.9)
if ((Settings->energy_kWhtoday > 0) && (0 == Settings->energy_kWhtoday_ph[0])) {
if ((Settings->energy_kWhtotal > 0) && (0 == Settings->energy_kWhtotal_ph[0])) {
Settings->energy_kWhtotal_ph[0] = Settings->energy_kWhtotal;
Settings->energy_kWhtoday_ph[0] = Settings->energy_kWhtoday;
Settings->energy_kWhyesterday_ph[0] = Settings->energy_kWhyesterday;
Settings->energy_kWhtotal_ph[0] = Settings->energy_kWhtotal;
RtcSettings.energy_kWhtoday_ph[0] = RtcSettings.energy_kWhtoday;
RtcSettings.energy_kWhtotal_ph[0] = RtcSettings.energy_kWhtotal;
Settings->energy_kWhtoday = 0;
Settings->energy_kWhtotal = 0;
}
// Energy.kWhtoday_offset = 0;