Skip to content

Commit 9319ce5

Browse files
committed
feat(Zigbee): factory reset when removed from network
1 parent c47324a commit 9319ce5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: libraries/Zigbee/src/ZigbeeCore.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct) {
329329
}
330330
}
331331
break;
332+
case ESP_ZB_ZDO_SIGNAL_LEAVE: // End Device
333+
// Device was removed from the network, factory reset the device
334+
Zigbee.factoryReset();
335+
break;
332336
default: log_v("ZDO signal: %s (0x%x), status: %s", esp_zb_zdo_signal_to_string(sig_type), sig_type, esp_err_to_name(err_status)); break;
333337
}
334338
}

0 commit comments

Comments
 (0)