Fix #86 set connected state of child things
parent
c562a831b3
commit
93a7fd7956
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue