diff --git a/libnymea-core/nymeacore.cpp b/libnymea-core/nymeacore.cpp index 83b4bc52..ae246218 100644 --- a/libnymea-core/nymeacore.cpp +++ b/libnymea-core/nymeacore.cpp @@ -211,8 +211,8 @@ QPair > NymeaCore::removeConfiguredThing(const } // Check if this is a child - if (!thing->parentId().isNull()) { - qCWarning(dcThingManager) << "Thing is a child of" << thing->parentId().toString() << ". Please remove the parent."; + if (!thing->parentId().isNull() && thing->autoCreated()) { + qCWarning(dcThingManager) << "Thing is an autocreated child of" << thing->parentId().toString() << ". Please remove the parent."; return QPair > (Thing::ThingErrorThingIsChild, QList()); } @@ -307,8 +307,8 @@ Thing::ThingError NymeaCore::removeConfiguredThing(const ThingId &thingId, const } // Check if this is a child - if (!thing->parentId().isNull()) { - qCWarning(dcThingManager) << "Thing is a child of" << thing->parentId().toString() << ". Please remove the parent."; + if (!thing->parentId().isNull() && thing->autoCreated()) { + qCWarning(dcThingManager) << "Thing is an autocreated child of" << thing->parentId().toString() << ". Please remove the parent."; return Thing::ThingErrorThingIsChild; }