mirror of
https://github.com/esphome/esphome.git
synced 2025-11-15 14:25:45 +00:00
still de-dupe
This commit is contained in:
@@ -34,8 +34,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define SAFE_PUBLISH_SENSOR_WITHOUT_FILTERS(sensor, value) \
|
#define SAFE_PUBLISH_SENSOR_WITHOUT_FILTERS(sensor, value) \
|
||||||
if ((sensor) != nullptr && (sensor)->sens->get_raw_state() != static_cast<float>(value)) { \
|
if ((sensor) != nullptr) { \
|
||||||
(sensor)->sens->publish_state(static_cast<float>(value)); \
|
if ((sensor)->publish_dedup.next(value)) { \
|
||||||
|
(sensor)->sens->raw_state = static_cast<float>(value); \
|
||||||
|
(sensor)->sens->internal_send_state_to_frontend(static_cast<float>(value)); \
|
||||||
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define highbyte(val) (uint8_t)((val) >> 8)
|
#define highbyte(val) (uint8_t)((val) >> 8)
|
||||||
|
|||||||
Reference in New Issue
Block a user