From b4224e6104c49ed575cc00b7c371136a632f3e7d Mon Sep 17 00:00:00 2001 From: sante85 Date: Fri, 20 Oct 2023 14:40:37 +0200 Subject: [PATCH] Update json_mqtt.py Add tag information to topic --- mppsolar/outputs/json_mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mppsolar/outputs/json_mqtt.py b/mppsolar/outputs/json_mqtt.py index dafa1713..5394796d 100644 --- a/mppsolar/outputs/json_mqtt.py +++ b/mppsolar/outputs/json_mqtt.py @@ -48,7 +48,7 @@ def build_msgs(self, *args, **kwargs): output = to_json(data, keep_case, excl_filter, filter) payload = js.dumps(output) msg = { - "topic": topic, + "topic": f"{tag}/{topic}", "payload": payload, } msgs.append(msg)