-
-
Notifications
You must be signed in to change notification settings - Fork 36.3k
Remove name from Shelly RGBCCT sensors
#157492
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 @thecode, @chemelli74, @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 removes the explicit name field from two Shelly RGBCCT sensor descriptions (power_rgbcct and energy_rgbcct), allowing Home Assistant's entity name translation system to automatically generate names based on the device class.
Key changes:
- Removed hardcoded "Power" and "Energy" names from RGBCCT sensor descriptions
- Added comprehensive test coverage to verify the new behavior
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| homeassistant/components/shelly/sensor.py | Removed name field from power_rgbcct and energy_rgbcct sensor descriptions, aligning them with other similar light component sensors (cct, rgb, rgbw) that rely on device class for automatic naming |
| tests/components/shelly/test_sensor.py | Added test to verify that RGBCCT sensors correctly have None for both name and translation_key fields, confirming proper entity naming behavior |
Breaking change
Proposed change
Once entity name translations are implemented, the name should not be returned.
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: