Skip to content

Commit

Permalink
re-add the velbus scan service
Browse files Browse the repository at this point in the history
  • Loading branch information
cereal2nd committed Jun 29, 2024
1 parent 1b7c451 commit 592029b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion velbusaio/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ async def read_protocol_data(self):
self.pdata = json.loads(await protocol_file.read())

async def scan(self, reload_cache: bool = False) -> None:
if reload_cache:
self._modulescan_address = 0
self._scan_complete = False
self._log.info(f"Start module scan, reload cache {reload_cache}")
while self._modulescan_address < 254:
address = 0
Expand Down Expand Up @@ -196,7 +199,7 @@ async def handle(self, rawmsg: RawMessage) -> None:
self._scan_delay_msec = SCAN_MODULEINFO_TIMEOUT_INTERVAL
# self._log.debug(f"Restart timeout {msg}")
# send the message to the modules
await self._velbus.get_module(msg.address).on_message(msg)
await module.on_message(msg)
else:
self._log.warning(f"NOT FOUND IN command_registry: {rawmsg}")

Expand Down

0 comments on commit 592029b

Please sign in to comment.