Merge pull request #9684 from s-hadinger/zigbee_fix_groupid

Zigbee fix group id reporting
This commit is contained in:
s-hadinger 2020-10-30 23:19:25 +01:00 committed by GitHub
commit 386e5924bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -829,9 +829,17 @@ bool Z_attribute_list::mergeList(const Z_attribute_list &attr_list) {
} else if (0xFF != attr_list.src_ep) {
if (src_ep != attr_list.src_ep) { return false; }
}
// Check group address
if (0xFFFF == group_id) {
group_id = attr_list.group_id;
} else if (0xFFFF != attr_list.group_id) {
if (group_id != attr_list.group_id) { return false; }
}
// copy LQI
if (0xFF != attr_list.lqi) {
lqi = attr_list.lqi;
}
// merge attributes
for (auto & attr : attr_list) {
replaceOrCreate(attr);
}