Skip to content

Commit 469f590

Browse files
authored
ZDO lqi & rtg schema added (#41)
* Add ZDO Mgmt Lqi & Rst schemas
1 parent c9d46b1 commit 469f590

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

zigpy_znp/commands/zdo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ class ZDO(t.CommandsBase, subsystem=t.Subsystem.ZDO):
11091109
t.Param(
11101110
"Status", t.ZDOStatus, "Status is either Success (0) or Failure (1)"
11111111
),
1112-
t.Param("Neighbours", zigpy.zdo.types.Neighbors, "Neighbours"),
1112+
t.Param("Neighbors", zigpy.zdo.types.Neighbors, "Neighbors"),
11131113
),
11141114
)
11151115

zigpy_znp/zigbee/zdo_converters.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,33 @@
116116
(lambda addr: c.ZDO.BindRsp.Callback(partial=True, Src=addr)),
117117
(lambda rsp: (ZDOCmd.Bind_rsp, {"Status": rsp.Status})),
118118
),
119+
ZDOCmd.Mgmt_Lqi_req: (
120+
(
121+
lambda addr, device, StartIndex: (
122+
c.ZDO.MgmtLqiReq.Req(
123+
Dst=addr,
124+
StartIndex=StartIndex,
125+
)
126+
)
127+
),
128+
(lambda addr: c.ZDO.MgmtLqiRsp.Callback(partial=True, Src=addr)),
129+
(
130+
lambda rsp: (
131+
ZDOCmd.Mgmt_Lqi_rsp,
132+
{"Status": rsp.Status, "Neighbors": rsp.Neighbors},
133+
)
134+
),
135+
),
136+
ZDOCmd.Mgmt_Rtg_req: (
137+
(
138+
lambda addr, StartIndex: (
139+
c.ZDO.MgmtLqiReq.Req(
140+
Dst=addr,
141+
StartIndex=StartIndex,
142+
)
143+
)
144+
),
145+
(lambda addr: c.ZDO.MgmtRtgRsp.Callback(partial=True, Src=addr)),
146+
(lambda rsp: (ZDOCmd.Mgmt_Rtg_rsp, {"Status": rsp.Status})),
147+
),
119148
}

0 commit comments

Comments
 (0)