Skip to content

Decouple MQTT identity from display labels - #44

Open
flowcool wants to merge 3 commits into
JGAguado:V2R1from
flowcool:upstream/42-identity
Open

flowcool wants to merge 3 commits into
JGAguado:V2R1from
flowcool:upstream/42-identity

Conversation

@flowcool

Copy link
Copy Markdown
Collaborator

Problem

The generic package derives technical identity from the display label. Changing a plant label can therefore change MQTT topic and discovery identity, which makes an upstream consumer migrate entities for a presentation-only change.

Change

  • Keep a configured device name as the technical identity and use the display label only for human-facing text.
  • Use stable function names for entities, with MAC/device-name generators for discovery identity.
  • Remove the generic package's MQTT topic-prefix override and document the migration paths for existing installs.
  • Keep standalone examples and printable metadata compatible.

This contribution contains no inventory, Home Assistant state, fork infrastructure, or device-specific values. It is a generic package change for V2R1.

Validation

  • 79 existing tests plus tests/test_identity_schema.py.
  • ESPHome 2026.10 isolated MQTT firmware build with synthetic credentials.
  • The schema proof changes the display label and verifies stable technical names, topic prefix, and discovery generators.

Refs #42

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.

1 participant