From 8b4878a226053388367908f757f448493218507e Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Sat, 10 Dec 2022 15:45:47 +0000 Subject: [PATCH] Fix MQTT topic --- get_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get_data.py b/get_data.py index 4917584..3cae87c 100644 --- a/get_data.py +++ b/get_data.py @@ -54,7 +54,7 @@ def send_to_mqtt(data: MQTTdata) -> None: "payload": data["battery"], }, { - "topic": "sensors/home/{data['mac']}/tele/SENSOR", + "topic": f"sensors/home/{data['mac']}/tele/SENSOR", "payload": json.dumps(data), }, ]