From 936764b89a63d1c7a59d17f908caab1a8b2680ef Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 22 Mar 2026 18:33:51 -1000 Subject: [PATCH] [text_sensor] Clarify compile-time vs runtime in raw_callback comment --- esphome/components/text_sensor/text_sensor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/text_sensor/text_sensor.h b/esphome/components/text_sensor/text_sensor.h index be3d94028d4..3f69e91c8d4 100644 --- a/esphome/components/text_sensor/text_sensor.h +++ b/esphome/components/text_sensor/text_sensor.h @@ -64,7 +64,8 @@ class TextSensor : public EntityBase { template void add_on_state_callback(F &&callback) { this->callback_.add(std::forward(callback)); } /// Add a callback that will be called every time the sensor sends a raw value. - /// Without filters, raw state equals filtered state so this delegates to the regular callback. + /// When USE_TEXT_SENSOR_FILTER is not enabled, delegates to the regular callback + /// since raw state equals filtered state without filter support compiled in. template void add_on_raw_state_callback(F &&callback) { #ifdef USE_TEXT_SENSOR_FILTER this->raw_callback_.add(std::forward(callback));