From 2dd12de1dc94ded848c5c1b99a556b3621364b63 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 14 Mar 2026 17:16:49 -1000 Subject: [PATCH] [ethernet] Fix Starting/Stopped/Starting log on RP2040 boot Don't set started_ = true in setup(). Let the link polling in loop() set it when the W5500 PHY link is actually up. Previously, setting it immediately caused a spurious state transition because the W5500 needs time after begin() before the link is ready. --- esphome/components/ethernet/ethernet_component_rp2040.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/esphome/components/ethernet/ethernet_component_rp2040.cpp b/esphome/components/ethernet/ethernet_component_rp2040.cpp index f47f57cb326..77b1a22d66c 100644 --- a/esphome/components/ethernet/ethernet_component_rp2040.cpp +++ b/esphome/components/ethernet/ethernet_component_rp2040.cpp @@ -75,8 +75,10 @@ void EthernetComponent::setup() { // via __addEthernetPacketHandler when no interrupt pin is used, // or via GPIO interrupt when one is provided. - // Mark as started - connection will be detected in loop() - this->started_ = true; + // Don't set started_ here — let the link polling in loop() set it + // when the W5500 link is actually up. Setting it prematurely causes + // a "Starting → Stopped → Starting" log sequence because the W5500 + // needs time after begin() before the PHY link is ready. } void EthernetComponent::loop() {