Fix MQTT topic

This commit is contained in:
Scott Wallace 2022-12-10 15:45:47 +00:00
parent 17a22dfb1b
commit 8b4878a226
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

View file

@ -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),
},
]