Zigbee fixed regression with SetOption101 (#18884)

This commit is contained in:
s-hadinger 2023-06-14 22:46:18 +02:00 committed by GitHub
parent 3a00dde3af
commit 28861821a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 11 deletions

View File

@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
- Interaction of ``SetOption92``, ``VirtualCT``, and ``RGBWWTable`` (#18768) - Interaction of ``SetOption92``, ``VirtualCT``, and ``RGBWWTable`` (#18768)
- Fixed HASPmota event when value is non-integer (fixes #18229) - Fixed HASPmota event when value is non-integer (fixes #18229)
- Matter fix local Occupancy sensor - Matter fix local Occupancy sensor
- Zigbee fixed regression with SetOption101
### Removed ### Removed

View File

@ -509,18 +509,10 @@ void convertClusterSpecific(class Z_attribute_list &attr_list, uint16_t cluster,
break; break;
} }
} else { // general case } else { // general case
// do we send command with endpoint suffix
char command_suffix[4] = { 0x00 }; // empty string by default
// if SO101 and multiple endpoints, append endpoint number
if (Settings->flag4.zb_index_ep) {
if (zigbee_devices.getShortAddr(shortaddr).countEndpoints() > 0) {
snprintf_P(command_suffix, sizeof(command_suffix), PSTR("%d"), srcendpoint);
}
}
if (0 == xyz.x_type) { if (0 == xyz.x_type) {
attr_list.addAttribute(command_name, command_suffix).setBool(true); attr_list.addAttribute(command_name).setBool(true);
} else if (0 == xyz.y_type) { } else if (0 == xyz.y_type) {
attr_list.addAttribute(command_name, command_suffix).setUInt(xyz.x); attr_list.addAttribute(command_name).setUInt(xyz.x);
} else { } else {
// multiple answers, create an array // multiple answers, create an array
JsonGeneratorArray arr; JsonGeneratorArray arr;
@ -529,7 +521,7 @@ void convertClusterSpecific(class Z_attribute_list &attr_list, uint16_t cluster,
if (xyz.z_type) { if (xyz.z_type) {
arr.add(xyz.z); arr.add(xyz.z);
} }
attr_list.addAttribute(command_name, command_suffix).setStrRaw(arr.toString().c_str()); attr_list.addAttribute(command_name).setStrRaw(arr.toString().c_str());
} }
} }
} }