mirror of
https://github.com/esphome/esphome.git
synced 2024-12-19 16:07:47 +01:00
Avoid unnecessary waits to stabilize the VOC algorithm (#1834)
This commit is contained in:
parent
ebadaa9660
commit
80ad784a4e
@ -220,7 +220,8 @@ void SGP40Component::update() {
|
||||
|
||||
uint32_t voc_index = this->measure_voc_index_();
|
||||
|
||||
if (this->samples_read_++ < this->samples_to_stabalize_) {
|
||||
if (this->samples_read_ < this->samples_to_stabalize_) {
|
||||
this->samples_read_++;
|
||||
ESP_LOGD(TAG, "Sensor has not collected enough samples yet. (%d/%d) VOC index is: %u", this->samples_read_,
|
||||
this->samples_to_stabalize_, voc_index);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user