feat: Use labels in Home Assistant entity naming #18678
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on: Koenkk/zigbee-herdsman-converters#6066, #18445 (comment), and #16702 (comment).
Finally fixes: #18445
This PR introduces using of a new
label
property fromexposes
in Home Assistant entity naming and brings entity naming to the requirements from home-assistant/core#95159 and https://developers.home-assistant.io/docs/core/entity/#entity-naming.This change also affects #18208 and contains several fixes to avoid the regression:
device_class
should be unnamed (e.g.Local Temperature Calibration
).binary_sensor
,button
,number
andsensor
entities types can be named by their device class, not all.entity_id
for the entity. This avoid breaking change from feat: Let Home Assistant generate entity name when device_class is present #18208 and f619610.Specifying the
object_id
for all entries in the discovery payload will avoid breaking changes for all users in the upcoming release, and also will allow us to completely change thelabel
of exposes (e.g.min_heat_setpoint_limit
->Minimum heat setpoint limit
) without affecting theentity_id
in Home Assistant, even if the device will be re-added.Tested on my 25 devices.