This commit is contained in:
2025-06-29 12:34:55 +02:00
parent 96704cb0de
commit 348e007f5e

View File

@@ -19,12 +19,12 @@ class mqtt_sender():
self.name = name self.name = name
self.password = password self.password = password
self.port = port self.port = port
client_id = "dasdasdasd333" self.client_id = "dasdasdasd333"
try: try:
client = mqtt_client.Client(mqtt_client.CallbackAPIVersion.VERSION1, client_id) self.client = mqtt_client.Client(mqtt_client.CallbackAPIVersion.VERSION1, client_id)
except: except:
client = mqtt_client.Client() self.client = mqtt_client.Client()
client.username_pw_set(self.name, self.password) self.client.username_pw_set(self.name, self.password)
def send_mqtt_message(_self, topic, msg): def send_mqtt_message(_self, topic, msg):
try: try: