Commit c6a8b47
pos-ei-don
refactor(entity): drop explicit entity_id override in complex naming
Complex naming was setting self.entity_id to force an installation-id-
prefixed entity_id, which tomer-w noted was a historical mistake from
before proper HA entity naming patterns were established.
Since DEFAULT_SIMPLE_NAMING is True, new installations already get
clean HA-derived entity_ids via simple naming. Complex naming only
exists for backward compatibility; existing entities keep their already-
registered entity_ids regardless. Removing the explicit self.entity_id
override lets HA derive entity_ids from the entity name — the same
approach simple naming uses.
The unique_id in complex naming is unchanged, so entity identity is
fully preserved. No display_id needed.1 parent f86b400 commit c6a8b47
2 files changed
Lines changed: 5 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
| 379 | + | |
| 380 | + | |
386 | 381 | | |
387 | 382 | | |
388 | 383 | | |
| |||
677 | 672 | | |
678 | 673 | | |
679 | 674 | | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
| 675 | + | |
688 | 676 | | |
689 | 677 | | |
690 | 678 | | |
| |||
711 | 699 | | |
712 | 700 | | |
713 | 701 | | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
| 702 | + | |
| 703 | + | |
721 | 704 | | |
722 | 705 | | |
723 | 706 | | |
| |||
0 commit comments