From 78c63311c6136dd2d479986bc069bf54d5f0a771 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 19 May 2025 01:25:21 -0400 Subject: [PATCH] Fix ethernet connection timeout issue caused by incorrect time value during setup (#8841) --- esphome/core/application.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esphome/core/application.cpp b/esphome/core/application.cpp index a81a2c580c..a71b848499 100644 --- a/esphome/core/application.cpp +++ b/esphome/core/application.cpp @@ -35,6 +35,8 @@ void Application::setup() { for (uint32_t i = 0; i < this->components_.size(); i++) { Component *component = this->components_[i]; + // Update loop_component_start_time_ before calling each component during setup + this->loop_component_start_time_ = millis(); component->call(); this->scheduler.process_to_add(); this->feed_wdt(); @@ -49,6 +51,8 @@ void Application::setup() { this->scheduler.call(); this->feed_wdt(); for (uint32_t j = 0; j <= i; j++) { + // Update loop_component_start_time_ right before calling each component + this->loop_component_start_time_ = millis(); this->components_[j]->call(); new_app_state |= this->components_[j]->get_component_state(); this->app_state_ |= new_app_state;