Skip to content

Migrate from get_object_id_hash() to make_entity_preference()#549

Merged
bdraco merged 1 commit intomainfrom
migrate-make-entity-preference
Feb 19, 2026
Merged

Migrate from get_object_id_hash() to make_entity_preference()#549
bdraco merged 1 commit intomainfrom
migrate-make-entity-preference

Conversation

@bdraco
Copy link
Member

@bdraco bdraco commented Feb 19, 2026

Summary

  • Replace global_preferences->make_preference<float>(get_object_id_hash()) with the new make_entity_preference<float>() API which encapsulates preference creation and handles automatic preference migration when the hash algorithm is updated to fix collisions
  • Bump min_version to 2026.2.0 across all configs

Test plan

  • Verify preferences are correctly loaded/saved after migration
  • Confirm min_version enforcement works with ESPHome 2026.2.0

Closes #543

Replace global_preferences->make_preference<float>(get_object_id_hash())
with the new make_entity_preference<float>() API which encapsulates
preference creation and handles automatic preference migration when the
hash algorithm is updated to fix collisions.

Bump min_version to 2026.2.0 across all configs.

Closes #543
@bdraco bdraco marked this pull request as ready for review February 19, 2026 15:17
@bdraco bdraco merged commit 8656ac6 into main Feb 19, 2026
23 checks passed
@bdraco bdraco deleted the migrate-make-entity-preference branch February 19, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate from get_object_id_hash() to make_entity_preference() for preferences

1 participant

Comments