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

This commit is contained in:
J. Nick Koston authored and GitHub committed 2026-01-26 17:35:45 -10:00
1 parent cd6314dc96
commit 75a78b2bf3
32 files changed
+97 -38

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ optional<bool> Switch::get_initial_state() {
if (!(restore_mode & RESTORE_MODE_PERSISTENT_MASK))
return {};
this->rtc_ = global_preferences->make_preference<bool>(this->get_preference_hash());
this->rtc_ = this->make_entity_preference<bool>();
bool initial_state;
if (!this->rtc_.load(&initial_state))
return {};