From bfb380d002310a6c1c78e8b9c35f29cdc931c1a9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 14 Mar 2026 17:16:49 -1000 Subject: [PATCH 1/2] [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() { From 0267dcc99866f36a5b0325645da7d21d8e7acb17 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 15 Mar 2026 14:45:29 -1000 Subject: [PATCH 2/2] [ethernet] Mark EthernetComponent as final --- esphome/components/ethernet/ethernet_component.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/ethernet/ethernet_component.h b/esphome/components/ethernet/ethernet_component.h index 7c139bb19c1..fb7c730fd4f 100644 --- a/esphome/components/ethernet/ethernet_component.h +++ b/esphome/components/ethernet/ethernet_component.h @@ -85,7 +85,7 @@ enum eth_duplex_t { ETH_DUPLEX_HALF, ETH_DUPLEX_FULL }; enum eth_speed_t { ETH_SPEED_10M, ETH_SPEED_100M }; #endif -class EthernetComponent : public Component { +class EthernetComponent final : public Component { public: EthernetComponent(); void setup() override;