Skip to content

Commit 186cb6a

Browse files
authored
Update matter_decommission.ino
I proposed this change because if my board is commissioned and I am far away from any Thread network, I won't be able to decommission it because it will get stuck on the many "while" statements inside the `setup()` function.
1 parent 9bff82c commit 186cb6a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

libraries/Matter/examples/matter_decommission/matter_decommission.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,20 @@ void setup()
4646
}
4747
while (!Matter.isDeviceCommissioned()) {
4848
delay(200);
49+
decommission_handler();
4950
}
5051

5152
Serial.println("Waiting for Thread network...");
5253
while (!Matter.isDeviceThreadConnected()) {
5354
delay(200);
55+
decommission_handler();
5456
}
5557
Serial.println("Connected to Thread network");
5658

5759
Serial.println("Waiting for Matter device discovery...");
5860
while (!matter_bulb.is_online()) {
5961
delay(200);
62+
decommission_handler();
6063
}
6164
Serial.println("Matter device is now online");
6265
}

0 commit comments

Comments
 (0)