Mennekes: Use voltage instead of current to determine connected phases

This commit is contained in:
Michael Zanetti 2023-07-26 13:23:27 +02:00 committed by Simon Stürz
parent ba922c7e7e
commit e95eac7dd5

View File

@ -482,13 +482,13 @@ void IntegrationPluginMennekes::updateECUPhaseCount(Thing *thing)
}
qCDebug(dcMennekes()) << "Actively charging phases:" << phaseCount;
if (phaseCount == 0) {
if (amtronECUConnection->meterCurrentL1() > 0) {
if (amtronECUConnection->meterVoltageL1() > 0) {
phaseCount++;
}
if (amtronECUConnection->meterCurrentL2() > 0) {
if (amtronECUConnection->meterVoltageL2() > 0) {
phaseCount++;
}
if (amtronECUConnection->meterCurrentL3() > 0) {
if (amtronECUConnection->meterVoltageL3() > 0) {
phaseCount++;
}
qCDebug(dcMennekes()) << "Connected phases:" << phaseCount;