mirror of
https://github.com/esphome/esphome.git
synced 2026-02-28 01:44:20 -07:00
Update esphome/components/sgp4x/sgp4x.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -59,7 +59,7 @@ void SGP4xComponent::setup() {
|
||||
if (this->store_baseline_) {
|
||||
// Hash with build time and serial number
|
||||
// This ensures the baseline storage is cleared after OTA
|
||||
// Serial numbers are unique to each sensor, so mulitple sensors can be used without conflict
|
||||
// Serial numbers are unique to each sensor, so multiple sensors can be used without conflict
|
||||
uint32_t hash = static_cast<uint32_t>(App.get_build_time()) ^ static_cast<uint32_t>(this->serial_number_);
|
||||
this->pref_ = global_preferences->make_preference<SGP4xBaselines>(hash, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user