Fix #86 set connected state of child things

This commit is contained in:
Simon Stürz 2022-09-30 11:58:34 +02:00
parent c562a831b3
commit 93a7fd7956

View File

@ -345,10 +345,12 @@ void IntegrationPluginKostal::setupKostalConnection(ThingSetupInfo *info)
if (!thing->setupComplete()) if (!thing->setupComplete())
return; return;
if (success) { thing->setStateValue("connected", success);
thing->setStateValue("connected", true); foreach (Thing *childThing, myThings().filterByParentId(thing->id())) {
} else { childThing->setStateValue("connected", success);
thing->setStateValue("connected", false); }
if (!success) {
// Try once to reconnect the device // Try once to reconnect the device
kostalConnection->reconnectDevice(); kostalConnection->reconnectDevice();
} }