diff --git a/esphome/core/application.cpp b/esphome/core/application.cpp index 4ed96f7300..9dda32f0e6 100644 --- a/esphome/core/application.cpp +++ b/esphome/core/application.cpp @@ -98,6 +98,11 @@ void Application::loop() { this->feed_wdt(last_op_end_time); for (Component *component : this->looping_components_) { + // Skip components that are done or failed + if (component->should_skip_loop()) { + continue; + } + // Update the cached time before each component runs this->loop_component_start_time_ = last_op_end_time; diff --git a/esphome/core/scheduler.cpp b/esphome/core/scheduler.cpp index 7d91241c72..eed222c974 100644 --- a/esphome/core/scheduler.cpp +++ b/esphome/core/scheduler.cpp @@ -211,8 +211,8 @@ void HOT Scheduler::call() { // Not reached timeout yet, done for this call break; } - // Don't run on failed or loop-done components - if (item->component != nullptr && item->component->should_skip_loop()) { + // Don't run on failed components + if (item->component != nullptr && item->component->is_failed()) { LockGuard guard{this->lock_}; this->pop_raw_(); continue;