SMA Homemanager: fix power value calculation

when consuming from the grid, the power meter value shall be positive, and it shall be negative when exporting power.
This commit is contained in:
Snoopy-HSS 2024-03-22 10:20:53 +01:00 committed by GitHub
parent b449dd1196
commit bbaed260f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,10 +135,10 @@ uint8_t* SMA_HMClass::decodeGroup(uint8_t* offset, uint16_t grouplen)
}
if (count == 8) {
_powerMeterPower = Peinspeisung - Pbezug;
_powerMeterL1 = EinspeisungL1 - BezugL1;
_powerMeterL2 = EinspeisungL2 - BezugL2;
_powerMeterL3 = EinspeisungL3 - BezugL3;
_powerMeterPower = Pbezug - Peinspeisung;
_powerMeterL1 = BezugL1 - EinspeisungL1;
_powerMeterL2 = BezugL2 - EinspeisungL2;
_powerMeterL3 = BezugL3 - EinspeisungL3;
Soutput(kanal, index, art, tarif, "Leistung", _powerMeterPower, timestamp);
Soutput(kanal, index, art, tarif, "Leistung L1", _powerMeterL1, timestamp);
Soutput(kanal, index, art, tarif, "Leistung L2", _powerMeterL2, timestamp);