diff --git a/esphome/components/sensor/sensor_with_dedup.h b/esphome/components/sensor/sensor_with_dedup.h index 026f2c2d2dd..6fab40f1e68 100644 --- a/esphome/components/sensor/sensor_with_dedup.h +++ b/esphome/components/sensor/sensor_with_dedup.h @@ -8,14 +8,12 @@ namespace esphome::sensor { /// Declare an optional child sensor that skips publishing a value equal to the last one. -#ifndef SUB_SENSOR_WITH_DEDUP #define SUB_SENSOR_WITH_DEDUP(name, dedup_type) \ protected: \ sensor::SensorWithDedup name##_sensor_{}; \ \ public: \ void set_##name##_sensor(sensor::Sensor *sensor) { this->name##_sensor_.set_sensor(sensor); } -#endif #define LOG_SENSOR_WITH_DEDUP(prefix, type, s) LOG_SENSOR(prefix, type, (s).get_sensor())