diff --git a/sbot/mqtt.py b/sbot/mqtt.py index ad132b7..3064b9c 100644 --- a/sbot/mqtt.py +++ b/sbot/mqtt.py @@ -4,6 +4,7 @@ import json import logging import os +import time from typing import Any, Callable, TypedDict from urllib.parse import urlparse @@ -150,7 +151,10 @@ def wrapped_publish( payload = payload.decode('utf-8') self.publish( topic, - json.dumps({"data": payload}), + json.dumps({ + "timestamp": time.time(), + "data": payload, + }), retain=retain, abs_topic=abs_topic) def _on_connect(