diff --git a/tasmota/xdrv_03_energy.ino b/tasmota/xdrv_03_energy.ino index 2caaaa292..f5e4a729d 100644 --- a/tasmota/xdrv_03_energy.ino +++ b/tasmota/xdrv_03_energy.ino @@ -97,7 +97,8 @@ struct ENERGY { uint8_t data_valid[3] = { 0, 0, 0 }; uint8_t phase_count = 1; // Number of phases active - bool voltage_common = false; // Use single voltage and frequency + bool voltage_common = false; // Use single voltage + bool frequency_common = false; // Use single frequency bool kWhtoday_offset_init = false; bool voltage_available = true; // Enable if voltage is measured @@ -1036,7 +1037,7 @@ void EnergyShow(bool json) } if (!isnan(Energy.frequency[0])) { ResponseAppend_P(PSTR(",\"" D_JSON_FREQUENCY "\":%s"), - EnergyFormat(value_chr, frequency_chr[0], json, Energy.voltage_common)); + EnergyFormat(value_chr, frequency_chr[0], json, Energy.frequency_common)); } } if (Energy.voltage_available) { @@ -1103,7 +1104,7 @@ void EnergyShow(bool json) } if (!isnan(Energy.frequency[0])) { WSContentSend_PD(PSTR("{s}" D_FREQUENCY "{m}%s " D_UNIT_HERTZ "{e}"), - EnergyFormat(value_chr, frequency_chr[0], json, Energy.voltage_common)); + EnergyFormat(value_chr, frequency_chr[0], json, Energy.frequency_common)); } } WSContentSend_PD(HTTP_ENERGY_SNS2, energy_daily_chr, energy_yesterday_chr, energy_total_chr); diff --git a/tasmota/xnrg_07_ade7953.ino b/tasmota/xnrg_07_ade7953.ino index 44bec2e59..3d7b405d5 100644 --- a/tasmota/xnrg_07_ade7953.ino +++ b/tasmota/xnrg_07_ade7953.ino @@ -209,10 +209,9 @@ void Ade7953DrvInit(void) } I2cSetActiveFound(ADE7953_ADDR, "ADE7953"); Ade7953.init_step = 2; - Energy.phase_count = 2; // Handle two channels as two phases - Energy.voltage_common = true; // Use common voltage and frequency - + Energy.voltage_common = true; // Use common voltage + Energy.frequency_common = true; // Use common frequency energy_flg = XNRG_07; } } diff --git a/tasmota/xnrg_10_sdm630.ino b/tasmota/xnrg_10_sdm630.ino index 026c3b4e8..d239c1c73 100644 --- a/tasmota/xnrg_10_sdm630.ino +++ b/tasmota/xnrg_10_sdm630.ino @@ -203,6 +203,7 @@ void Sdm630SnsInit(void) if (result) { if (2 == result) { ClaimSerial(); } Energy.phase_count = 3; + Energy.frequency_common = true; // Use common frequency } else { energy_flg = ENERGY_NONE; }