From 273419a2379eb53c848613d7e4b21a690d6468c2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 18 Mar 2026 09:51:59 -1000 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- esphome/components/ota/ota_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/ota/ota_backend.h b/esphome/components/ota/ota_backend.h index cc6ef365be..bcefcf4f0d 100644 --- a/esphome/components/ota/ota_backend.h +++ b/esphome/components/ota/ota_backend.h @@ -75,7 +75,7 @@ class OTAComponent : public Component { */ void notify_state_deferred_(OTAState state, float progress, uint8_t error) { // Pack state, error, and progress into a single uint32_t so the lambda - // captures only [this, packed] (8 bytes) — fits in std::function SBO. + // captures only [this, packed] (8 bytes) — intended to fit in std::function SBO on supported toolchains. // Layout: [state:8][error:8][progress_fixed:16] where progress is 0–10000 (0.01% resolution) uint32_t packed = (static_cast(state) << 24) | (static_cast(error) << 16) | static_cast(progress * 100.0f);