From 4a9cfeddcd36110ddfa312080a1d737892244a3e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 6 Sep 2025 22:56:57 -0500 Subject: [PATCH] better name --- esphome/core/scheduler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/core/scheduler.cpp b/esphome/core/scheduler.cpp index 65c58e401e..cb8f5c75b8 100644 --- a/esphome/core/scheduler.cpp +++ b/esphome/core/scheduler.cpp @@ -326,8 +326,8 @@ void HOT Scheduler::call(uint32_t now) { const auto now_64 = this->millis_64_(now); // 'now' from parameter - fresh from Application::loop() this->process_to_add(); - // Track if we add any interval items during this call - bool added_intervals = false; + // Track if any items were added to to_add_ during this call (intervals or from callbacks) + bool added_items = false; #ifdef ESPHOME_DEBUG_SCHEDULER static uint64_t last_print = 0; @@ -474,11 +474,11 @@ void HOT Scheduler::call(uint32_t now) { this->to_add_.push_back(std::move(item)); } - added_intervals |= this->to_add_.empty() == false; + added_items |= this->to_add_.empty() == false; } } - if (added_intervals) { + if (added_items) { this->process_to_add(); } }