From 8c8c08d40c1d04c47969e37747a3fd8dee190f39 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 15 Jul 2025 11:51:01 -1000 Subject: [PATCH 1/3] Fix timing overflow when components disable themselves during loop (#9529) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- esphome/core/application.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/esphome/core/application.cpp b/esphome/core/application.cpp index d6fab018cc..e19acd3ba6 100644 --- a/esphome/core/application.cpp +++ b/esphome/core/application.cpp @@ -309,6 +309,12 @@ void Application::disable_component_loop_(Component *component) { if (this->in_loop_ && i == this->current_loop_index_) { // Decrement so we'll process the swapped component next this->current_loop_index_--; + // Update the loop start time to current time so the swapped component + // gets correct timing instead of inheriting stale timing. + // This prevents integer underflow in timing calculations by ensuring + // the swapped component starts with a fresh timing reference, avoiding + // errors caused by stale or wrapped timing values. + this->loop_component_start_time_ = millis(); } } return; From 4182076f642a433098668f0a0942b71aa2a1aea2 Mon Sep 17 00:00:00 2001 From: Samuel Sieb Date: Tue, 15 Jul 2025 15:03:02 -0700 Subject: [PATCH 2/3] [as3935_spi] remove unnecessary includes (#9528) --- esphome/components/as3935_spi/as3935_spi.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/esphome/components/as3935_spi/as3935_spi.h b/esphome/components/as3935_spi/as3935_spi.h index 073f5c09a4..e5422f9b37 100644 --- a/esphome/components/as3935_spi/as3935_spi.h +++ b/esphome/components/as3935_spi/as3935_spi.h @@ -3,8 +3,6 @@ #include "esphome/core/component.h" #include "esphome/components/as3935/as3935.h" #include "esphome/components/spi/spi.h" -#include "esphome/components/sensor/sensor.h" -#include "esphome/components/binary_sensor/binary_sensor.h" namespace esphome { namespace as3935_spi { From 90a16ffa891a37588d6cd1eea2bf9f1fa28c0149 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 16 Jul 2025 10:45:20 +1200 Subject: [PATCH 3/3] Bump version to 2025.7.0b5 --- Doxyfile | 2 +- esphome/const.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Doxyfile b/Doxyfile index e09116d202..454db4b41b 100644 --- a/Doxyfile +++ b/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = ESPHome # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 2025.7.0b4 +PROJECT_NUMBER = 2025.7.0b5 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/esphome/const.py b/esphome/const.py index 44ec5ec9b9..cd86694a42 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -4,7 +4,7 @@ from enum import Enum from esphome.enum import StrEnum -__version__ = "2025.7.0b4" +__version__ = "2025.7.0b5" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" VALID_SUBSTITUTIONS_CHARACTERS = (