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.
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}" |
There was a problem hiding this comment.
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: