diff --git a/esphome/components/wifi/wifi_component_esp8266.cpp b/esphome/components/wifi/wifi_component_esp8266.cpp index 335112a6f9..1c744648bb 100644 --- a/esphome/components/wifi/wifi_component_esp8266.cpp +++ b/esphome/components/wifi/wifi_component_esp8266.cpp @@ -242,11 +242,7 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) { if (!this->wifi_mode_(true, {})) return false; - // Skip disconnect for roaming - let the SDK handle the transition - // This preserves TCP connections during the brief AP switch - if (!this->roaming_connect_active_) { - this->wifi_disconnect_(); - } + this->wifi_disconnect_(); struct station_config conf {}; memset(&conf, 0, sizeof(conf));