mirror of
https://github.com/esphome/esphome.git
synced 2024-12-23 14:04:53 +01:00
wifi: handle WIFI_REASON_ROAMING reason in event (#5153)
This commit is contained in:
parent
3843d21dbf
commit
9b19c45735
1 changed files with 5 additions and 1 deletions
|
@ -569,6 +569,8 @@ const char *get_disconnect_reason_str(uint8_t reason) {
|
|||
return "Handshake Failed";
|
||||
case WIFI_REASON_CONNECTION_FAIL:
|
||||
return "Connection Failed";
|
||||
case WIFI_REASON_ROAMING:
|
||||
return "Station Roaming";
|
||||
case WIFI_REASON_UNSPECIFIED:
|
||||
default:
|
||||
return "Unspecified";
|
||||
|
@ -631,7 +633,9 @@ void WiFiComponent::wifi_process_event_(IDFWiFiEvent *data) {
|
|||
if (it.reason == WIFI_REASON_NO_AP_FOUND) {
|
||||
ESP_LOGW(TAG, "Event: Disconnected ssid='%s' reason='Probe Request Unsuccessful'", buf);
|
||||
s_sta_connect_not_found = true;
|
||||
|
||||
} else if (it.reason == WIFI_REASON_ROAMING) {
|
||||
ESP_LOGI(TAG, "Event: Disconnected ssid='%s' reason='Station Roaming'", buf);
|
||||
return;
|
||||
} else {
|
||||
ESP_LOGW(TAG, "Event: Disconnected ssid='%s' bssid=" LOG_SECRET("%s") " reason='%s'", buf,
|
||||
format_mac_addr(it.bssid).c_str(), get_disconnect_reason_str(it.reason));
|
||||
|
|
Loading…
Reference in a new issue