File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -137,16 +137,16 @@ async def open_commissioning_window(
137
137
node_id : int ,
138
138
timeout : int = 300 ,
139
139
iteration : int = 1000 ,
140
- option : int = 0 ,
140
+ option : int = 1 ,
141
141
discriminator : Optional [int ] = None ,
142
- ) -> int :
142
+ ) -> tuple [ int , str ] :
143
143
"""
144
144
Open a commissioning window to commission a device present on this controller to another.
145
145
146
146
Returns code to use as discriminator.
147
147
"""
148
148
return cast (
149
- int ,
149
+ tuple [ int , str ] ,
150
150
await self .send_command (
151
151
APICommand .OPEN_COMMISSIONING_WINDOW ,
152
152
node_id = node_id ,
Original file line number Diff line number Diff line change @@ -240,9 +240,9 @@ async def open_commissioning_window(
240
240
node_id : int ,
241
241
timeout : int = 300 ,
242
242
iteration : int = 1000 ,
243
- option : int = 0 ,
243
+ option : int = 1 ,
244
244
discriminator : int | None = None ,
245
- ) -> int :
245
+ ) -> tuple [ int , str ] :
246
246
"""
247
247
Open a commissioning window to commission a device present on this controller to another.
248
248
@@ -254,15 +254,15 @@ async def open_commissioning_window(
254
254
if discriminator is None :
255
255
discriminator = 3840 # TODO generate random one
256
256
257
- await self ._call_sdk (
257
+ pin , code = await self ._call_sdk (
258
258
self .chip_controller .OpenCommissioningWindow ,
259
259
nodeid = node_id ,
260
260
timeout = timeout ,
261
261
iteration = iteration ,
262
262
discriminator = discriminator ,
263
263
option = option ,
264
264
)
265
- return discriminator
265
+ return pin , code
266
266
267
267
@api_command (APICommand .DISCOVER )
268
268
async def discover_commissionable_nodes (
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ async def test_server_start(
220
220
"node_id" : 1 ,
221
221
"timeout" : 300 ,
222
222
"iteration" : 1000 ,
223
- "option" : 0 ,
223
+ "option" : 1 ,
224
224
"discriminator" : None ,
225
225
}
226
226
assert not (
You can’t perform that action at this time.
0 commit comments