Skip to content

Commit 0aae699

Browse files
committed
Break out
1 parent 07777a2 commit 0aae699

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

plugwise_usb/network/__init__.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,6 @@ async def discover_nodes(self, load: bool = True) -> bool:
492492
if load:
493493
return await self._load_discovered_nodes()
494494

495-
if self.accept_join_request and not self._old_acc_join_req:
496-
await self.allow_join_requests(True)
497-
self._old_acc_join_req = True
498-
if not self.accept_join_request and self._old_acc_join_req:
499-
await self.allow_join_requests(False)
500-
self._old_acc_join_req = False
501-
502495
return True
503496

504497
async def stop(self) -> None:
@@ -515,6 +508,15 @@ async def stop(self) -> None:
515508

516509
# endregion
517510

511+
async def test123(self) -> None:
512+
if self.accept_join_request and not self._old_acc_join_req:
513+
await self.allow_join_requests(True)
514+
self._old_acc_join_req = True
515+
if not self.accept_join_request and self._old_acc_join_req:
516+
await self.allow_join_requests(False)
517+
self._old_acc_join_req = False
518+
519+
518520
async def allow_join_requests(self, state: bool) -> None:
519521
"""Enable or disable Plugwise network."""
520522
_LOGGER.debug("HOI try setting allow_join_requests to True")

0 commit comments

Comments
 (0)