mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
Fix nan issue for engineering mode
This commit is contained in:
parent
2f77d31690
commit
6ff866cf5b
1 changed files with 3 additions and 3 deletions
|
@ -255,16 +255,16 @@ void LD2410Component::handle_periodic_data_(uint8_t *buffer, int len) {
|
|||
} else {
|
||||
for (auto *s : this->gate_move_sensors_) {
|
||||
if (s != nullptr && !std::isnan(s->get_state())) {
|
||||
s->publish_state(NAN);
|
||||
s->publish_state(0);
|
||||
}
|
||||
}
|
||||
for (auto *s : this->gate_still_sensors_) {
|
||||
if (s != nullptr && !std::isnan(s->get_state())) {
|
||||
s->publish_state(NAN);
|
||||
s->publish_state(0);
|
||||
}
|
||||
}
|
||||
if (this->light_sensor_ != nullptr && !std::isnan(this->light_sensor_->get_state())) {
|
||||
this->light_sensor_->publish_state(NAN);
|
||||
this->light_sensor_->publish_state(0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue