Skip to content

Commit f48143a

Browse files
committed
Enable/disable automatic joining based on accept_join_request
1 parent 0970fc2 commit f48143a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugwise_usb/network/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,12 @@ async def discover_network_coordinator(self, load: bool = False) -> bool:
318318
):
319319
if load:
320320
return await self._load_node(self._controller.mac_coordinator)
321+
if self.accept_join_request:
322+
await self.allow_join_requests(True)
323+
else:
324+
await self.allow_join_requests(False)
321325
return True
326+
322327
return False
323328

324329
# endregion

0 commit comments

Comments
 (0)