From fe3fb5fea265c9478d91fc19a1a4be37722fcc4a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 19 Oct 2026 13:07:30 -1000 Subject: [PATCH] Match the calibration hint count to the hub method and note why copy keeps COMPONENT_SCHEMA --- esphome/components/atm90e32/button/__init__.py | 7 +++++-- esphome/components/copy/button/__init__.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/esphome/components/atm90e32/button/__init__.py b/esphome/components/atm90e32/button/__init__.py index d09bae0429b..108ad521beb 100644 --- a/esphome/components/atm90e32/button/__init__.py +++ b/esphome/components/atm90e32/button/__init__.py @@ -31,8 +31,11 @@ CONFIG_SCHEMA = { } -def _press(action: str, *hints: str) -> str: - args = "".join(f", LOG_STR({cpp_string_escape(hint)})" for hint in hints) +def _press(action: str, hint: str | None = None, hint2: str | None = None) -> str: + """press_calibration_button() logs at most two hint lines.""" + args = "".join( + f", LOG_STR({cpp_string_escape(h)})" for h in (hint, hint2) if h is not None + ) return f"press_calibration_button(entity, &{ATM90E32Component}::{action}{args})" diff --git a/esphome/components/copy/button/__init__.py b/esphome/components/copy/button/__init__.py index 4ef5a9c9aa5..b24445eb237 100644 --- a/esphome/components/copy/button/__init__.py +++ b/esphome/components/copy/button/__init__.py @@ -16,6 +16,7 @@ CONFIG_SCHEMA = ( cv.Required(CONF_SOURCE_ID): cv.use_id(button.Button), } ) + # Kept so configs with setup_priority still validate; the Apply button is not a Component .extend(cv.COMPONENT_SCHEMA) )