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 quirks v2 sensors/platforms to provide a lambda for parsing state #305

Open
TheJulianJES opened this issue Nov 25, 2024 · 2 comments
Labels
enhancement New feature or request quirks Quirks related

Comments

@TheJulianJES
Copy link
Contributor

We should consider providing a way that lets v2 quirks provide a lambda to allow ZHA to parse ZCL attribute state to a different HA state with the parsing being in the v2 quirk.

This should be implemented for at least binary sensors and normal/analog sensors.

We may also want to consider the other platforms.
Switch currently has a special force_inverted, invert_attribute_name implementation.

@TheJulianJES
Copy link
Contributor Author

Some helpers in zha-quirks tests would also be needed, so we can actually test the "attribute converters" in zha-quirks.

@puddly
Copy link
Contributor

puddly commented Nov 26, 2024

This may help clean up all of the _attribute_updated overrides too. These end up in the zigpy attribute cache and are persisted to disk in a modified form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request quirks Quirks related
Projects
None yet
Development

No branches or pull requests

2 participants