From 10af47f8f41c5cd01f4ddef2329969b169afef57 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 2 Jan 2023 12:26:40 +0100 Subject: [PATCH] Fix swapped voltage/power in energy dummy --- tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino b/tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino index 8a1abd304..1a661b91a 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino @@ -61,10 +61,10 @@ void NrgDummyEverySecond(void) { float current_calibration = (float)EnergyGetCalibration(channel, ENERGY_CURRENT_CALIBRATION) / 100000; float frequency_calibration = (float)EnergyGetCalibration(channel, ENERGY_FREQUENCY_CALIBRATION) / 100; - Energy.voltage[channel] = power_calibration; // V + Energy.voltage[channel] = voltage_calibration; // V Energy.frequency[channel] = frequency_calibration; // Hz if (bitRead(TasmotaGlobal.power, channel)) { // Emulate power read only if device is powered on - Energy.active_power[channel] = (NrgDummy.power[channel]) ? ((float)NrgDummy.power[channel] / 1000) : voltage_calibration; // W + Energy.active_power[channel] = (NrgDummy.power[channel]) ? ((float)NrgDummy.power[channel] / 1000) : power_calibration; // W if (0 == Energy.active_power[channel]) { Energy.current[channel] = 0; } else {