[core] Encapsulate entity preference creation to prepare for hash migration (#13505)

This commit is contained in:
J. Nick Koston
2026-01-26 17:35:45 -10:00
committed by GitHub
parent cd6314dc96
commit 75a78b2bf3
32 changed files with 97 additions and 38 deletions
@@ -10,7 +10,7 @@ static const char *const TAG = "integration";
void IntegrationSensor::setup() {
if (this->restore_) {
this->pref_ = global_preferences->make_preference<float>(this->get_preference_hash());
this->pref_ = this->make_entity_preference<float>();
float preference_value = 0;
this->pref_.load(&preference_value);
this->result_ = preference_value;