1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-20 12:12:24 +01:00

[wifi] Guard wifi error cases introduced in IDF5.2 by a version check (#10466)

This commit is contained in:
Mischa Siekmann
2025-09-01 22:51:03 +02:00
committed by GitHub
parent 77dbe77117
commit d0b4bc48e4

View File

@@ -654,12 +654,14 @@ const char *get_disconnect_reason_str(uint8_t reason) {
return "Association comeback time too long"; return "Association comeback time too long";
case WIFI_REASON_SA_QUERY_TIMEOUT: case WIFI_REASON_SA_QUERY_TIMEOUT:
return "SA query timeout"; return "SA query timeout";
#if (ESP_IDF_VERSION_MAJOR >= 5) && (ESP_IDF_VERSION_MINOR >= 2)
case WIFI_REASON_NO_AP_FOUND_W_COMPATIBLE_SECURITY: case WIFI_REASON_NO_AP_FOUND_W_COMPATIBLE_SECURITY:
return "No AP found with compatible security"; return "No AP found with compatible security";
case WIFI_REASON_NO_AP_FOUND_IN_AUTHMODE_THRESHOLD: case WIFI_REASON_NO_AP_FOUND_IN_AUTHMODE_THRESHOLD:
return "No AP found in auth mode threshold"; return "No AP found in auth mode threshold";
case WIFI_REASON_NO_AP_FOUND_IN_RSSI_THRESHOLD: case WIFI_REASON_NO_AP_FOUND_IN_RSSI_THRESHOLD:
return "No AP found in RSSI threshold"; return "No AP found in RSSI threshold";
#endif
case WIFI_REASON_UNSPECIFIED: case WIFI_REASON_UNSPECIFIED:
default: default:
return "Unspecified"; return "Unspecified";