File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ ZigbeeEP::ZigbeeEP(uint8_t endpoint) {
16
16
_endpoint = endpoint;
17
17
_ep_config.endpoint = 0 ;
18
18
_cluster_list = nullptr ;
19
+ _on_identify = nullptr ;
19
20
#if !CONFIG_DISABLE_HAL_LOCKS
20
21
if (!lock) {
21
22
lock = xSemaphoreCreateBinary ();
@@ -193,7 +194,9 @@ void ZigbeeEP::zbReadBasicCluster(const esp_zb_zcl_attribute_t *attribute) {
193
194
194
195
void ZigbeeEP::zbIdentify (const esp_zb_zcl_set_attr_value_message_t *message) {
195
196
if (message->attribute .id == ESP_ZB_ZCL_CMD_IDENTIFY_IDENTIFY_ID && message->attribute .data .type == ESP_ZB_ZCL_ATTR_TYPE_U16) {
196
- _on_identify (*(uint16_t *)message->attribute .data .value );
197
+ if (_on_identify != NULL ) {
198
+ _on_identify (*(uint16_t *)message->attribute .data .value );
199
+ }
197
200
} else {
198
201
log_w (" Other identify commands are not implemented yet." );
199
202
}
You can’t perform that action at this time.
0 commit comments