Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,3 +559,19 @@ def test_neighbors_missing_payload():
Src=0x821F,
Status=t.ZDOStatus.NOT_SUPPORTED,
)


def test_routes_missing_payload():
frame = frames.GeneralFrame(
header=t.CommandHeader(
id=0xB2,
subsystem=t.Subsystem.ZDO,
type=t.CommandType.AREQ,
),
data=b"\x85\xCC\x84",
)

assert c.ZDO.MgmtRtgRsp.Callback.from_frame(frame) == c.ZDO.MgmtRtgRsp.Callback(
Src=0xCC85,
Status=t.ZDOStatus.NOT_SUPPORTED,
)
2 changes: 1 addition & 1 deletion zigpy_znp/commands/zdo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ class ZDO(t.CommandsBase, subsystem=t.Subsystem.ZDO):
t.Param(
"Status", t.ZDOStatus, "Status is either Success (0) or Failure (1)"
),
t.Param("Routes", zigpy.zdo.types.Routes, "Routes"),
t.Param("Routes", zigpy.zdo.types.Routes, "Routes", optional=True),
),
)

Expand Down
Loading