1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-10 03:51:52 +00:00

[bl0940] Fix calibration number preference hash for multi-device configs (#11769)

This commit is contained in:
J. Nick Koston
2025-11-09 16:27:56 -06:00
committed by GitHub
parent e7ff56f1cd
commit cbb98c4050

View File

@@ -9,7 +9,7 @@ static const char *const TAG = "bl0940.number";
void CalibrationNumber::setup() {
float value = 0.0f;
if (this->restore_value_) {
this->pref_ = global_preferences->make_preference<float>(this->get_object_id_hash());
this->pref_ = global_preferences->make_preference<float>(this->get_preference_hash());
if (!this->pref_.load(&value)) {
value = 0.0f;
}