From 97ac7a6d9bbde73a31e3727089d765e6b51ad1f5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 12 Nov 2025 17:21:12 -0600 Subject: [PATCH] still de-dupe --- esphome/components/ld24xx/ld24xx.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/esphome/components/ld24xx/ld24xx.h b/esphome/components/ld24xx/ld24xx.h index 0428f27127..81e8d92535 100644 --- a/esphome/components/ld24xx/ld24xx.h +++ b/esphome/components/ld24xx/ld24xx.h @@ -34,8 +34,11 @@ } #define SAFE_PUBLISH_SENSOR_WITHOUT_FILTERS(sensor, value) \ - if ((sensor) != nullptr && (sensor)->sens->get_raw_state() != static_cast(value)) { \ - (sensor)->sens->publish_state(static_cast(value)); \ + if ((sensor) != nullptr) { \ + if ((sensor)->publish_dedup.next(value)) { \ + (sensor)->sens->raw_state = static_cast(value); \ + (sensor)->sens->internal_send_state_to_frontend(static_cast(value)); \ + } \ } #define highbyte(val) (uint8_t)((val) >> 8)