diff --git a/esphome/components/wifi/wifi_component.cpp b/esphome/components/wifi/wifi_component.cpp index 1c043e221e..f774f6b64a 100644 --- a/esphome/components/wifi/wifi_component.cpp +++ b/esphome/components/wifi/wifi_component.cpp @@ -895,7 +895,7 @@ bool WiFiComponent::load_fast_connect_settings_() { if (this->fast_connect_pref_.load(&fast_connect_save)) { // Validate saved AP index - if (fast_connect_save.ap_index >= this->sta_.size()) { + if (static_cast(fast_connect_save.ap_index) >= this->sta_.size()) { ESP_LOGW(TAG, "Saved AP index out of bounds"); return false; }