Add ZDO converter for Mgmt_Bind_req; update return format to match zigpy expectations #110
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a ZDO converter for the
Mgmt_Bind_req
request and fixes the response mapping back to zigpy. This request fetches the binding table from a device.The field names in the existing ZDO command definition didn't match the expected names at https://github.com/zigpy/zigpy/blob/77dec68ab51a9205535a0b47ae2f6f27f27ec73f/zigpy/zdo/types.py#L664-L669
Ideally, I think this should follow the same pattern used for
Neighbors
andRoutes
, with a struct defined in zigpy for the binding table collection. However, since that involves coordinating PRs across both repos and could break compatibility, we'll stick with this smaller change.I didn't add any tests for this, because none of the similar requests like
Mgmt_Lqi_req
orMgmt_Rtg_req
seemed to have test coverage. I'm happy to take a stab at adding tests for it if there's a pattern anyone can point me to for testing the ZDO converters.