Fix SG ready set state on mode changed

pull/597/head
Simon Stürz 2022-08-18 14:13:20 +02:00
parent 860fbac0e8
commit df0ce33b38
1 changed files with 2 additions and 2 deletions

View File

@ -91,8 +91,8 @@ void IntegrationPluginSgReady::setupThing(ThingSetupInfo *info)
// Reflect the SG states
connect(sgReadyInterface, &SgReadyInterface::sgReadyModeChanged, this, [thing, sgReadyInterface](SgReadyInterface::SgReadyMode mode){
Q_UNUSED(mode)
thing->setSettingValue(sgReadyInterfaceGpio1StateStateTypeId, sgReadyInterface->gpio1()->value() == Gpio::ValueHigh);
thing->setSettingValue(sgReadyInterfaceGpio2StateStateTypeId, sgReadyInterface->gpio2()->value() == Gpio::ValueHigh);
thing->setStateValue(sgReadyInterfaceGpio1StateStateTypeId, sgReadyInterface->gpio1()->value() == Gpio::ValueHigh);
thing->setStateValue(sgReadyInterfaceGpio2StateStateTypeId, sgReadyInterface->gpio2()->value() == Gpio::ValueHigh);
});
m_sgReadyInterfaces.insert(thing, sgReadyInterface);