Description
We should support translations for all select entity values in HA. For that, we need to standardize on all enums being snake_case
. Do note that this will be a breaking change. PR zigpy/zha#86 can likely just be updated.
-
For the first implementation, we should (IMO) just convert all possible casings in ZHA using the approach mentioned here: Allow translations for enum values in EnumSensor and ZHAEnumSelectEntity entities zha#86 (comment).
This will also affect custom quirks using custom enums. In the future, we could slowly change all the enums in zigpy/quirks? Or at least standardize quirks on whatever casing zigpy uses. -
We'll also need to make sure to handle the non-ZCL backed select entities correctly that restore state. That should just be a simple conversion from the
OldFormat
to thenew_format
. For the ZCL entities, this isn't necessary. -
We'll also need to add the correct translations to
strings.json
in HA. We should automatically generate these for quirks v2 entities.
This should be somewhat similar to auto-generating the strings for quirks v2 entity names fromfallback_name
, except we'll need to get a proper string from the enum name. These will likely need to be fine-tuned manually, though that should be do-able.
Example of auto-generating the quirks v2 entity names: home-assistant/core@dev...TheJulianJES:core:tjj/zha_translation_key_generation#diff-5d97af3392f844cfcf573642b8ae8a0cc9d605b107865aafea51083d089c7ba0R13-R37For the ZHA select entities, we might be able to generate them automatically as well (at least one-time) or we can just manually add them, as there shouldn't be too many.
-
More..?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status