-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Use "Output" for Shelly RPC switch sub-device names #158139
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 @bieniu, @thecode, @chemelli74, 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 updates the naming convention for Shelly RPC switch sub-devices from "Switch" to "Output" to align with Shelly's official device UI terminology. This improves consistency for users who interact with both Home Assistant and the Shelly app.
Key Changes
- Modified
get_rpc_sub_device_name()function to return "Output" instead of "Switch" for switch components - Added comprehensive test coverage for the
get_rpc_sub_device_name()function including edge cases
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| homeassistant/components/shelly/utils.py | Added special case handling for "switch" component to use "Output" naming instead of the default titlecase naming |
| tests/components/shelly/test_utils.py | Added new test function with parametrized test cases covering all component types including switches, covers, lights, and energy meters, plus tests for custom names and emeter phases |
|
thanks |
Proposed change
Use "Output" instead of "Switch" for Shelly RPC sub-device names to match Shelly's own device UI naming convention.
Previously, multi-channel switch devices like the Power Strip Gen4 would create sub-devices named "Switch 0", "Switch 1", etc. However, the Shelly device UI labels these as "Output (0)", "Output (1)", etc. This change aligns Home Assistant's naming with Shelly's terminology for better consistency.
Before
After
Shelly device UI
Type of change
Additional information
Checklist
ruff format homeassistant tests)To help with the load of incoming pull requests: