Merge PR #149: Schrack: Ignore bogus CP signal state which happens occationally

This commit is contained in:
jenkins 2023-08-17 14:11:26 +02:00
commit 0ffa917a73

View File

@ -161,6 +161,10 @@ void IntegrationPluginSchrack::setupThing(ThingSetupInfo *info)
connect(cionConnection, &CionModbusRtuConnection::cpSignalStateChanged, thing, [=](quint16 cpSignalState){
qCDebug(dcSchrack()) << "CP Signal state changed:" << (char)cpSignalState;
if (cpSignalState < 65 || cpSignalState > 68) {
qCWarning(dcSchrack()) << "Ignoring bogus CP signal state value" << cpSignalState;
return;
}
thing->setStateValue(cionPluggedInStateTypeId, cpSignalState >= 66);
});