1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-28 21:48:16 +00:00

[ld2450] Fix for "unknown" sensor states (#8305)

This commit is contained in:
Keith Burzinski 2025-02-25 20:49:12 -06:00 committed by GitHub
parent 1b7111affb
commit 7375dde39c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,7 +113,7 @@ void LD2450Component::setup() {
this->pref_ = global_preferences->make_preference<float>(this->presence_timeout_number_->get_object_id_hash());
this->set_presence_timeout();
#endif
this->read_all_info();
this->restart_and_read_all_info();
}
void LD2450Component::dump_config() {
@ -317,7 +317,7 @@ void LD2450Component::query_zone_info() {
void LD2450Component::restart_and_read_all_info() {
this->set_config_mode_(true);
this->restart_();
this->set_timeout(1000, [this]() { this->read_all_info(); });
this->set_timeout(1500, [this]() { this->read_all_info(); });
}
// Send command with values to LD2450