Merge PR #100: Mennekes: Fix CP signal state E handling

master
jenkins 2022-12-14 23:59:34 +01:00
commit c3b7e2e829
1 changed files with 4 additions and 0 deletions

View File

@ -404,6 +404,10 @@ void IntegrationPluginMennekes::setupAmtronECUConnection(ThingSetupInfo *info)
connect(amtronECUConnection, &AmtronECUModbusTcpConnection::cpSignalStateChanged, thing, [thing](AmtronECUModbusTcpConnection::CPSignalState cpSignalState) {
qCDebug(dcMennekes()) << "CP signal state changed" << cpSignalState;
if (cpSignalState == AmtronECUModbusTcpConnection::CPSignalStateE) {
// State E (Off): don't update as the wallbox goes to this state for a few seconds regardless of the actual plugged in state.
return;
}
thing->setStateValue(amtronECUPluggedInStateTypeId, cpSignalState >= AmtronECUModbusTcpConnection::CPSignalStateB);
});
connect(amtronECUConnection, &AmtronECUModbusTcpConnection::signalledCurrentChanged, thing, [](quint16 signalledCurrent) {