[text_sensor] Clarify compile-time vs runtime in raw_callback comment

This commit is contained in:
J. Nick Koston
2026-03-22 18:33:58 -10:00
parent 1458b03d7f
commit 936764b89a
+2 -1
View File
@@ -64,7 +64,8 @@ class TextSensor : public EntityBase {
template<typename F> void add_on_state_callback(F &&callback) { this->callback_.add(std::forward<F>(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<typename F> void add_on_raw_state_callback(F &&callback) {
#ifdef USE_TEXT_SENSOR_FILTER
this->raw_callback_.add(std::forward<F>(callback));