Skip to content
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

Allow translation key even when device class is overridden #234

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

benbancroft
Copy link

@benbancroft benbancroft commented Oct 13, 2024

Since zigpy/zigpy#1474 was merged, translation_key and/or fallback_name is a mandatory field for a V2 quirk entity, and the restriction of not being able to set them when device class is explictly set has been dropped.

From what I can tell, there isn't a good reason for this restriction, and the device class alone isn't a replacement for not having a translation key (such as the case when a device has two sensors of the same device class and you need a way to differentiate between them). If my understanding is flawed here, please let me know and we can drop this PR.

On the ZHA side, the check for device is still present. This pull request is for its removal.

@benbancroft benbancroft marked this pull request as draft October 13, 2024 17:31
@benbancroft benbancroft changed the title llow translation key even when device class is overridden Allow translation key even when device class is overridden Oct 13, 2024
@benbancroft benbancroft marked this pull request as ready for review October 13, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant