-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Set has entity name to True in Meater #146954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey there @Sotolotl, @emontnemery, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@@ -189,7 +190,7 @@ def __init__( | |||
}, | |||
manufacturer="Apption Labs", | |||
model="Meater Probe", | |||
name=f"Meater Probe {device_id}", | |||
name=f"Meater Probe {device_id[:8]}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know it's safe to truncate the device ID like this? If we end up with several sensors with the same entity_id (but suffixed by a number) it's a huge mess for users to untangle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this a bit and it's probably fine to do the truncation even if we risk device name collisions.
Marking this as draft since there are merge conflicts. |
# Conflicts: # tests/components/meater/snapshots/test_sensor.ambr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are there so many changes to the snapshots?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because has entity name was turned off and there were translations so stuff just went south
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what that means.
Can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so the issue was that the entity translations did not work because the PR adding them did not set has_entity_name
to True
@joostlek conflicts |
# Conflicts: # tests/components/meater/snapshots/test_sensor.ambr
Proposed change
Set has entity name to True in Meater, this was forgotten in PR #95732
Also truncate the device id when generating device name because it is very very long, making it not user friendly.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: