-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
Allow translations for enum values in EnumSensor and ZHAEnumSelectEntity entities #109309
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
…ompatibility with zigpy enums
…add some translations for sensors
|
Hey there @dmulcahey, @Adminiuga, @puddly, @TheJulianJES, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
We have recently migrated the core of ZHA to its own library: https://github.com/zigpy/zha. This is going to have to be reworked to an extent. Sorry for the inconvenience and Thanks! |
|
Thanks for the heads-up. I reworked it and made a complementary PR in zigpy/zha. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
|
If there is still interest in this getting merged, I am willing to continue to work on it. |
|
@Caius-Bonus I think the zigpy/zha PR needs to be accepted and merged before this PR can move forward? |
|
That is correct. But I haven't heard back yet from @puddly, so I don't know how to move forward yet. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
|
I still want to work on it, but I have been busy. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Breaking Change
Unfortunately, the internal state will have to change from the current form (titles with spaces and the first letter, but sometimes multiple letters, being a capital; some are even CamelCase) to snake_case without any capitals or spaces. Automations that depend on this will seize to function, unless we come up with some mitigation.
Proposed change
Convert enums to lowercase snake_case in Sensor and Select entities.
Add translations for EnumSensor and EnumSelectEntity entities in zigpy/zha.
Type of change
Additional information
Some _attr_translation_keys in zigpy/zha needed to be changed, because of overlap.
Some enum value names were CamelCase (for compatibility, these haven't been changed).
Some enum values had multiple capitals (for compatibility, these haven't been changed).
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..coveragerc.To help with the load of incoming pull requests: