mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Zigbee fix attribute not reported
This commit is contained in:
parent
cf2d135f33
commit
82df1a9152
@ -717,6 +717,7 @@ void ZCLFrame::applySynonymAttributes(Z_attribute_list& attr_list) {
|
|||||||
Z_attribute_synonym syn = Z_plugin_matchAttributeSynonym(device.modelId, device.manufacturerId,
|
Z_attribute_synonym syn = Z_plugin_matchAttributeSynonym(device.modelId, device.manufacturerId,
|
||||||
attr.cluster, attr.attr_id);
|
attr.cluster, attr.attr_id);
|
||||||
if (syn.found()) {
|
if (syn.found()) {
|
||||||
|
AddLog(LOG_LEVEL_DEBUG, PSTR("ZIG: apply synonym %04X/%04X with %04X/%04X (mul:%i div:%i)"), attr.cluster, attr.attr_id, syn.new_cluster, syn.new_attribute, syn.multiplier, syn.divider);
|
||||||
if (syn.new_attribute == 0xFFFF) { // if attr is 0xFFFF, remove attribute
|
if (syn.new_attribute == 0xFFFF) { // if attr is 0xFFFF, remove attribute
|
||||||
attr_list.removeAttribute(&attr);
|
attr_list.removeAttribute(&attr);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1773,6 +1773,7 @@ void Z_IncomingMessage(class ZCLFrame &zcl_received) {
|
|||||||
callBerryZigbeeDispatcher("attributes_refined", &zcl_received, &attr_list, srcaddr);
|
callBerryZigbeeDispatcher("attributes_refined", &zcl_received, &attr_list, srcaddr);
|
||||||
#endif // USE_BERRY
|
#endif // USE_BERRY
|
||||||
|
|
||||||
|
if (!attr_list.isEmpty()) {
|
||||||
if (defer_attributes) {
|
if (defer_attributes) {
|
||||||
// Prepare for publish
|
// Prepare for publish
|
||||||
if (zigbee_devices.jsonIsConflict(srcaddr, attr_list)) {
|
if (zigbee_devices.jsonIsConflict(srcaddr, attr_list)) {
|
||||||
@ -1780,13 +1781,14 @@ void Z_IncomingMessage(class ZCLFrame &zcl_received) {
|
|||||||
zigbee_devices.jsonPublishFlush(srcaddr);
|
zigbee_devices.jsonPublishFlush(srcaddr);
|
||||||
}
|
}
|
||||||
zigbee_devices.jsonAppend(srcaddr, attr_list);
|
zigbee_devices.jsonAppend(srcaddr, attr_list);
|
||||||
zigbee_devices.setTimer(srcaddr, 0 /* groupaddr */, USE_ZIGBEE_COALESCE_ATTR_TIMER, clusterid, srcendpoint, Z_CAT_READ_ATTR, 0, &Z_PublishAttributes);
|
zigbee_devices.setTimer(srcaddr, 0 /* groupaddr */, USE_ZIGBEE_COALESCE_ATTR_TIMER, 0 /*clusterid*/, srcendpoint, Z_CAT_READ_ATTR, 0, &Z_PublishAttributes);
|
||||||
} else {
|
} else {
|
||||||
// Publish immediately
|
// Publish immediately
|
||||||
zigbee_devices.jsonPublishNow(srcaddr, attr_list);
|
zigbee_devices.jsonPublishNow(srcaddr, attr_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef USE_ZIGBEE_EZSP
|
#ifdef USE_ZIGBEE_EZSP
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user