mirror of https://github.com/arendst/Tasmota.git
Merge pull request #9787 from s-hadinger/zigbee_fix_zboccupancy
Fix ignore Occupancy timeout
This commit is contained in:
commit
2f05d8707d
|
@ -1294,7 +1294,9 @@ void ZCLFrame::generateCallBacks(Z_attribute_list& attr_list) {
|
||||||
if (&pir_found != nullptr) {
|
if (&pir_found != nullptr) {
|
||||||
pir_timer = pir_found.getTimeoutSeconds() * 1000;
|
pir_timer = pir_found.getTimeoutSeconds() * 1000;
|
||||||
}
|
}
|
||||||
|
if (pir_timer > 0) {
|
||||||
zigbee_devices.setTimer(_srcaddr, 0 /* groupaddr */, pir_timer, _cluster_id, _srcendpoint, Z_CAT_VIRTUAL_OCCUPANCY, 0, &Z_OccupancyCallback);
|
zigbee_devices.setTimer(_srcaddr, 0 /* groupaddr */, pir_timer, _cluster_id, _srcendpoint, Z_CAT_VIRTUAL_OCCUPANCY, 0, &Z_OccupancyCallback);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
zigbee_devices.resetTimersForDevice(_srcaddr, 0 /* groupaddr */, Z_CAT_VIRTUAL_OCCUPANCY);
|
zigbee_devices.resetTimersForDevice(_srcaddr, 0 /* groupaddr */, Z_CAT_VIRTUAL_OCCUPANCY);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue