diff --git a/TheengsGateway/ble_gateway.py b/TheengsGateway/ble_gateway.py index 9a827dc..51800fc 100644 --- a/TheengsGateway/ble_gateway.py +++ b/TheengsGateway/ble_gateway.py @@ -394,14 +394,10 @@ def check_tracker_timeout(self) -> None: if ( round(time()) - time_model.time >= self.configuration["tracker_timeout"] and time_model.time != 0 - and ( - self.configuration["discovery"] - or self.configuration["general_presence"] - ) ): if ( time_model.model_id in ("APPLEWATCH", "APPLEDEVICE") - and not self.configuration["discovery"] + and self.configuration["general_presence"] ): message = json.dumps( {"id": address, "presence": "absent", "unlocked": False} @@ -415,8 +411,10 @@ def check_tracker_timeout(self) -> None: + "/" + address.replace(":", ""), ) + time_model.time = 0 self.discovered_trackers[address] = time_model + logger.info("[TO] Discovered Trackers: %s", self.discovered_trackers) async def ble_scan_loop(self) -> None: