Skip to content

Commit

Permalink
allow hunting multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodriguez committed Nov 17, 2023
1 parent 1b0b933 commit 7346db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions platform/panduza_platform/core/platform_device_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def get_devices_store(self):
# ---

async def hunt_start(self):
self.__log.info(f"HUNT NEW SESSION")
keys = self.__device_templates.keys()
max = len(keys)
self.__hunt_iter = iter(self.__device_templates.keys())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ async def hunt_task(self):
has_next = await self.platform.device_factory.hunt_next()
if not has_next:
break
self.hunting = False
await self._update_attribute("devices", "hunting", self.hunting)
print(f"!!!!!!!!!!!!!! HUNT !!!!!!!!!!!!!!!")


0 comments on commit 7346db4

Please sign in to comment.