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())
return;
if (success) {
thing->setStateValue("connected", true);
} else {
thing->setStateValue("connected", false);
thing->setStateValue("connected", success);
foreach (Thing *childThing, myThings().filterByParentId(thing->id())) {
childThing->setStateValue("connected", success);
}
if (!success) {
// Try once to reconnect the device
kostalConnection->reconnectDevice();
}