This commit is contained in:
2025-12-30 14:52:20 +01:00
parent e6aabef60b
commit 9a425738fa
2 changed files with 3 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ class MQTTService:
def publish(self, topic: str, data: str, qos: int = 0):
try:
self.connect()
result = self.client.publish(topic, json.dumps(data), qos=qos)
result = self.client.publish(topic, data, qos=qos)
result.wait_for_publish()
except Exception as e:
print(f"An error occurred while publishing on {topic} on {self.address} : {e}")