-
-
Notifications
You must be signed in to change notification settings - Fork 36.3k
Add missing strings for Shelly voltmeter sensor #159332
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
Add missing strings for Shelly voltmeter sensor #159332
Conversation
|
Hey there @bieniu, @thecode, @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
Pull request overview
This PR adds missing translation strings for Shelly voltmeter sensors that have channel names. These strings are automatically used by the configure_translation_attributes() method in the Shelly entity base class, which appends _with_channel_name to translation keys when a device has multiple channels.
Key changes:
- Adds two new translation keys for voltmeter sensors with channel name placeholders
| "name": "Voltmeter value {channel_name}" | ||
| }, | ||
| "voltmeter_with_channel_name": { | ||
| "name": "Voltmeter {channel_name}" |
Copilot
AI
Dec 17, 2025
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.
The naming pattern for these translation strings is inconsistent with the established pattern in this file. All other _with_channel_name entries place the channel name placeholder at the beginning (e.g., "{channel_name} pulse counter value", "{channel_name} power factor"), but these new entries place it at the end ("Voltmeter value {channel_name}", "Voltmeter {channel_name}").
For consistency, these should be:
- "voltmeter_value_with_channel_name":
"name": "{channel_name} voltmeter value" - "voltmeter_with_channel_name":
"name": "{channel_name} voltmeter"
| "name": "Voltmeter value {channel_name}" | |
| }, | |
| "voltmeter_with_channel_name": { | |
| "name": "Voltmeter {channel_name}" | |
| "name": "{channel_name} voltmeter value" | |
| }, | |
| "voltmeter_with_channel_name": { | |
| "name": "{channel_name} voltmeter" |
Proposed change
Add missing strings for Shelly voltmeter sensor:
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: