Fix #86 set connected state of child things

master
Simon Stürz 2022-09-30 11:58:34 +02:00
parent c562a831b3
commit 93a7fd7956
1 changed files with 6 additions and 4 deletions

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();
} }