From fc1186895c23526f2df7d8113e2525ce2b2354b2 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 22 Mar 2026 16:03:44 -1000 Subject: [PATCH] [binary_sensor] Fix stale comment in StatefulEntityBase docs --- esphome/core/entity_base.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/esphome/core/entity_base.h b/esphome/core/entity_base.h index d638434d49..e3a1891da6 100644 --- a/esphome/core/entity_base.h +++ b/esphome/core/entity_base.h @@ -301,9 +301,10 @@ void log_entity_unit_of_measurement(const char *tag, const char *prefix, const E * Subclasses must implement: * - get_state(): return a const reference to the current value * - set_state_value_(): store a new value (called only when the state actually changes) + * - get_trigger_on_initial_state() / set_trigger_on_initial_state(): control initial callback behavior * - * State tracking uses EntityBase::flags_.has_state (not optional) to avoid redundant storage. - * Subclasses own their storage — this class never allocates memory for the state value itself. + * This class does not store the state value — subclasses own their storage. Whether a state + * has been set is tracked by EntityBase::has_state(). * * Callback behavior: * - full_state_callbacks_: fired on every change, receives optional previous and current