Fix pv battery discharge calculation

pull/39/head
Simon Stürz 2021-10-29 18:01:57 +02:00
parent 80ba708eff
commit c3bbfa795a
1 changed files with 4 additions and 4 deletions

View File

@ -826,10 +826,10 @@ double IntegrationPluginSunSpec::calculateSolarEdgePvProduction(Thing *thing, do
// Actual PV = inverter DC power + battery power
pvPower = dcPower - battery->batteryData().instantaneousPower;
qCDebug(dcSunSpec()) << "--> SolarEdge: calculate actual PV power: inverter DC power - battery power:" << dcPower << "-" << battery->batteryData().instantaneousPower << "=" << pvPower;
// if (pvPower < 0) {
// qCDebug(dcSunSpec()) << "--> SolarEdge: actual PV power: 0W | loss:" << pvPower << "W";
// pvPower = 0;
// }
if (pvPower > 0) {
qCDebug(dcSunSpec()) << "--> SolarEdge: actual PV power: 0W | loss:" << pvPower << "W";
pvPower = 0;
}
break;
}
default: