only setup temperature sensor is owfs setup was successfull

master
Boernsman 2020-10-28 20:09:26 +01:00
parent 27d1861886
commit c21791bcda
1 changed files with 4 additions and 2 deletions

View File

@ -152,8 +152,10 @@ void IntegrationPluginOneWire::setupThing(ThingSetupInfo *info)
if (parentThing->setupComplete()) {
setupOwfsTemperatureSensor(info);
} else {
connect(parentThing, &Thing::setupStatusChanged, [info, this] {
setupOwfsTemperatureSensor(info);
connect(parentThing, &Thing::setupStatusChanged, info, [info, parentThing, this] {
if (parentThing->setupComplete()) {
setupOwfsTemperatureSensor(info);
}
});
}
} else {