From 70b69c8acff7dda33f01e7cdbab18687c6d9d812 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 16 Oct 2026 10:58:44 -1000 Subject: [PATCH] Make LOG_SENSOR_WITH_DEDUP a plain LOG_SENSOR wrapper --- esphome/components/sensor/sensor_with_dedup.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/esphome/components/sensor/sensor_with_dedup.h b/esphome/components/sensor/sensor_with_dedup.h index 8bd94bb93af..6fab40f1e68 100644 --- a/esphome/components/sensor/sensor_with_dedup.h +++ b/esphome/components/sensor/sensor_with_dedup.h @@ -15,10 +15,7 @@ namespace esphome::sensor { public: \ void set_##name##_sensor(sensor::Sensor *sensor) { this->name##_sensor_.set_sensor(sensor); } -#define LOG_SENSOR_WITH_DEDUP_SAFE(tag, name, sensor) \ - if ((sensor).has_sensor()) { \ - LOG_SENSOR(tag, name, (sensor).get_sensor()); \ - } +#define LOG_SENSOR_WITH_DEDUP(prefix, type, s) LOG_SENSOR(prefix, type, (s).get_sensor()) /// A sensor pointer that may be null plus the last value it published, stored inline. /// Publishing does nothing when no sensor is set, and skips a value equal to the last one.