From fd8726b4794707865ef7b86541ae41369940bcc3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 30 Oct 2025 13:07:03 -0500 Subject: [PATCH] comment it --- esphome/components/select/select.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/esphome/components/select/select.h b/esphome/components/select/select.h index fbbecaa5c1..801074a4d5 100644 --- a/esphome/components/select/select.h +++ b/esphome/components/select/select.h @@ -84,7 +84,13 @@ class Select : public EntityBase { /** Set the value of the select, this is a virtual method that each select integration must implement. * - * This method is called by the SelectCall. + * This method is called by control(size_t) when not overridden, or directly by external code. + * All existing integrations implement this method. New integrations can optionally override + * control(size_t) instead to work with indices directly and avoid string conversions. + * + * Delegation chain: + * - SelectCall::perform() → control(size_t) → [if not overridden] → control(string) + * - External code → control(string) → publish_state(string) → publish_state(size_t) * * @param value The value as validated by the SelectCall. */