[multiple] Fix reliability issues in 5 components (#14655)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
authored and GitHub committed 2026-03-09 18:32:57 -04:00
1 parent d2686b49be
commit d96be88ff5
5 files changed
+37 -2

No files matched your search

@@ -271,10 +271,16 @@ void BME680BSECComponent::read_() {
int64_t curr_time_ns = this->get_time_ns_();
if (this->bme680_settings_.trigger_measurement) {
uint32_t start = millis();
while (this->bme680_.power_mode != BME680_SLEEP_MODE) {
if (millis() - start > 50) {
ESP_LOGE(TAG, "Timeout waiting for BME680 to enter sleep mode");
return;
}
this->bme680_status_ = bme680_get_sensor_mode(&this->bme680_);
if (this->bme680_status_ != BME680_OK) {
ESP_LOGW(TAG, "Failed to get sensor mode (BME680 Error Code %d)", this->bme680_status_);
ESP_LOGE(TAG, "Failed to get sensor mode (BME680 Error Code %d)", this->bme680_status_);
return;
}
}
}