aqhome-nodes: only announce values if uid != 0 and != -1

Those ids occur for freshly assembled nodes.
This commit is contained in:
Martin Preuss
2024-09-30 18:26:05 +02:00
parent 2d7459394e
commit 3a9bb3d5ec

View File

@@ -248,7 +248,8 @@ void _handleMsgDevice(AQHOMED *aqh, const GWEN_MSG *msg)
_assignDeviceId(aqh, ni, uid); _assignDeviceId(aqh, ni, uid);
_updateTimestampLastChange(ni); _updateTimestampLastChange(ni);
AQH_NodeDb_SetModified(aqh->nodeDb); AQH_NodeDb_SetModified(aqh->nodeDb);
_announceNodeValues(aqh, ni); if (uid!=0x00000000L && uid!=0xffffffff)
_announceNodeValues(aqh, ni);
} }
else { else {
DBG_INFO(AQH_LOGDOMAIN, "Error handling message"); DBG_INFO(AQH_LOGDOMAIN, "Error handling message");