Skip to content

Commit

Permalink
Update ble_gateway.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiH committed Feb 7, 2024
1 parent c00fc8a commit 9aed505
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TheengsGateway/ble_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,15 +558,15 @@ def publish_json(
data_json["id"] in self.discovered_trackers
and self.discovered_trackers[data_json["id"]] == 0
)
) and self.configuration["general_presence"]:
) and self.configuration["general_presence"]: # type: ignore[return-value]
message = json.dumps({"id": data_json["id"], "presence": "present"})
self.publish(
message,
self.configuration["publish_topic"]
+ "/"
+ get_address(data_json).replace(":", ""),
)
self.discovered_trackers[data_json["id"]] = round(time())
self.discovered_trackers[data_json["id"]] = round(time()) # type: ignore[return-value]
logger.debug("Discovered Trackers: %s", self.discovered_trackers)
# Remove "track" if PUBLISH_ADVDATA is 0
if not self.configuration["publish_advdata"] and "track" in data_json:
Expand Down

0 comments on commit 9aed505

Please sign in to comment.