allow the same plugin fetching a zigbeenode multiple times

inform the zigbeemanager about things finishing loading
This commit is contained in:
Michael Zanetti 2020-11-16 22:18:19 +01:00
parent 57ec37712a
commit bfc4476019
2 changed files with 3 additions and 3 deletions

View File

@ -88,12 +88,12 @@ ZigbeeNode *ZigbeeHardwareResourceImplementation::claimNode(ZigbeeHandler *handl
return nullptr;
}
if (m_nodeHandlers.contains(node)) {
if (m_nodeHandlers.contains(node) && m_nodeHandlers.value(node) != handler) {
qCWarning(dcZigbeeResource()) << "Node with address" << extendedAddress << "is already claimed by another handler (" << m_nodeHandlers.value(node)->name() << "). Not allowing node to be reclaimed.";
return nullptr;
}
m_nodeHandlers.insert(node, handler);
m_nodeHandlers[node] = handler;
return node;
}

View File

@ -824,7 +824,7 @@ void NymeaCore::thingManagerLoaded()
// Evaluate rules on current time
onDateTimeChanged(m_timeManager->currentDateTime());
// Tell zigbee we're done with loading stuff...
// Tell hardare resources we're done with loading stuff...
m_hardwareManager->thingsLoaded();
emit initialized();