mirror of
https://github.com/esphome/esphome.git
synced 2025-03-13 14:18:14 +00:00
Merge b88508bc4307c3a1ccfdd905e406855705bcda4c into 96682f5cbefe9cd38d76adac1dcef779ee25ff7e
This commit is contained in:
commit
293253cba5
@ -79,7 +79,7 @@ void SGP30Component::setup() {
|
||||
uint32_t hash = fnv1_hash(App.get_compilation_time() + std::to_string(this->serial_number_));
|
||||
this->pref_ = global_preferences->make_preference<SGP30Baselines>(hash, true);
|
||||
|
||||
if (this->pref_.load(&this->baselines_storage_)) {
|
||||
if (this->store_baseline_ && this->pref_.load(&this->baselines_storage_)) {
|
||||
ESP_LOGI(TAG, "Loaded eCO2 baseline: 0x%04X, TVOC baseline: 0x%04X", this->baselines_storage_.eco2,
|
||||
baselines_storage_.tvoc);
|
||||
this->eco2_baseline_ = this->baselines_storage_.eco2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user