diff --git a/esphome/components/sensor/sensor.h b/esphome/components/sensor/sensor.h index 73fd10ea6fb..ee0fc628281 100644 --- a/esphome/components/sensor/sensor.h +++ b/esphome/components/sensor/sensor.h @@ -116,7 +116,8 @@ class Sensor : public EntityBase { /// Add a callback that will be called every time a filtered value arrives. 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_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_SENSOR_FILTER this->raw_callback_.add(std::forward(callback));