diff --git a/esphome/components/ld24xx/ld24xx.h b/esphome/components/ld24xx/ld24xx.h index 9d8a062540..9975099663 100644 --- a/esphome/components/ld24xx/ld24xx.h +++ b/esphome/components/ld24xx/ld24xx.h @@ -34,8 +34,9 @@ } #define SAFE_PUBLISH_SENSOR_WITHOUT_FILTERS(sensor, value) \ - if ((sensor) != nullptr && (sensor)->sens->get_state() != (value)) { \ - (sensor)->sens->publish_state(value); \ + if ((sensor) != nullptr) { \ + (sensor)->publish_dedup.next(value); \ + (sensor)->sens->publish_state(static_cast(value)); \ } #define highbyte(val) (uint8_t)((val) >> 8)