From e4af9efa4e48e22674ff5b762debbbf2244b8eb7 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 18 Feb 2026 13:28:53 -0600 Subject: [PATCH] [core] Keep declarations unconditional to fix clang-tidy component.h is included before defines.h in application.h, so the #ifdef guards on declarations were evaluated before the define was visible. Keep declarations always visible (harmless unused declarations cost nothing) and only guard the definitions. --- esphome/core/component.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/esphome/core/component.h b/esphome/core/component.h index fd99295c86..bef275f972 100644 --- a/esphome/core/component.h +++ b/esphome/core/component.h @@ -109,9 +109,7 @@ class Component { float get_actual_setup_priority() const; -#ifdef USE_SETUP_PRIORITY_OVERRIDE void set_setup_priority(float priority); -#endif /** priority of loop(). higher -> executed earlier * @@ -564,9 +562,8 @@ class WarnIfComponentBlockingGuard { Component *component_; }; -#ifdef USE_SETUP_PRIORITY_OVERRIDE // Function to clear setup priority overrides after all components are set up +// Only has an implementation when USE_SETUP_PRIORITY_OVERRIDE is defined void clear_setup_priority_overrides(); -#endif } // namespace esphome