1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-15 06:15:47 +00:00

still de-dupe

This commit is contained in:
J. Nick Koston
2025-11-12 17:15:14 -06:00
parent 078458fea9
commit 1cec97008b

View File

@@ -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<float>(value)); \
}
#define highbyte(val) (uint8_t)((val) >> 8)