only setup temperature sensor is owfs setup was successfull

This commit is contained in:
Boernsman 2020-10-28 20:09:26 +01:00
parent 27d1861886
commit c21791bcda

View File

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