-
Notifications
You must be signed in to change notification settings - Fork 34
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
quirk v2 entities are force-creates even if they are not supported #373
Comments
Why not have separate quirks for each FW version and use filters so they only apply to the correct firmware? I think we should get away from a quirk specifying functionality only to have it vanish because of an unsupported attribute and we also shouldn't forcibly expose entities that aren't actually supported IMO. @TheJulianJES @puddly thoughts? |
Hmm, I'll take another look again. I don't think we can use |
Any arbitrary callable can be used iirc… don’t even need to look at the signature in V2 |
Yeah, but we can't wait to read attributes at that stage, right? |
There is no reason we can’t… the ergonomics of the API should be enhanced to support it though… rn filters are sync. We already read model and manufacturer https://github.com/zigpy/zigpy/blob/95baa8b07547d34c733936b946891990e5695145/zigpy/endpoint.py#L195 before we apply quirks… maybe we should also read sw_build_id from basic at the same time? Either way… we can read this early or make the filter spec async… thoughts? |
Is there a consensus on what the right approach is? |
@dmulcahey @TheJulianJES can we please conclude here? Should I write a |
After #365 is merged, we may want to revisit this and consider if we want to include an option in v2 quirks that only enables entity creation if the attribute is (1) readable/cached and/or (2) not marked as unsupported. |
Hey,
While working on zigpy/zha-device-handlers#3568, I've noticed that HA/ZHA creates select entities even if a device doesn't support them due to differences in firmware, for instance.
After some debugging, the problem is in this
if
condition:zha/zha/application/platforms/select.py
Line 190 in 6737b36
The
ENTITY_METADATA not in kwargs
part is not true for entities from quirks (v2, at least).For more details, please see the discussion in zigpy/zha-device-handlers#3568
The text was updated successfully, but these errors were encountered: