Skip to content

migrate from get_object_id_hash() to make_entity_preference()#107

Merged
heythisisnate merged 1 commit into
masterfrom
make-entity-preference
Feb 20, 2026
Merged

migrate from get_object_id_hash() to make_entity_preference()#107
heythisisnate merged 1 commit into
masterfrom
make-entity-preference

Conversation

@heythisisnate

@heythisisnate heythisisnate commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Replace deprecated get_object_id_hash() API with the new make_entity_preference() helper method introduced in #13505. This change:

  • Prevents hash collisions when entity names sanitize to the same string
  • Enables automatic preference migration for future hash algorithm updates
  • Uses device-aware hashing to avoid collisions across devices

Updated components:

  • secplus_gdo switch, select, and number entities

Updated minimum ESPHome version to 2026.2.0 for all platforms (ESP32, ESP32-S3, ESP8266).

Fixes #106

Replace deprecated get_object_id_hash() API with the new
make_entity_preference<T>() helper method introduced in ESPHome
PR #13505. This change:

- Prevents hash collisions when entity names sanitize to the same string
- Enables automatic preference migration for future hash algorithm updates
- Uses device-aware hashing to avoid collisions across devices

Updated components:
- secplus_gdo switch, select, and number entities

Updated minimum ESPHome version to 2026.2.0 for ESP32-S3

Fixes #106

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@heythisisnate
heythisisnate merged commit 680a46f into master Feb 20, 2026
1 check passed
@heythisisnate
heythisisnate deleted the make-entity-preference branch February 20, 2026 16:58
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