1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-13 22:28:14 +00:00

Debug disconnecting before connected

This commit is contained in:
J. Nick Koston 2025-02-21 18:31:58 -06:00
parent f11f7af957
commit 6ee10540f6
No known key found for this signature in database

View File

@ -145,6 +145,7 @@ void BLEClientBase::_unconditional_disconnect() {
if (this->state_ == espbt::ClientState::SEARCHING || this->state_ == espbt::ClientState::READY_TO_CONNECT ||
this->state_ == espbt::ClientState::DISCOVERED || this->state_ == espbt::ClientState::DISCONNECTING) {
this->set_address(0);
this->conn_id_ = UNSET_CONN_ID;
this->set_state(espbt::ClientState::IDLE);
} else {
this->set_state(espbt::ClientState::DISCONNECTING);