From 584f226b62a7d7248a144f0cac992bb584c1f788 Mon Sep 17 00:00:00 2001 From: revil-O Date: Mon, 8 Apr 2024 16:05:27 +0200 Subject: [PATCH] mqtt CallbackAPIVersion fix for paho.mqtt >= 2.0.0 fix to work with paho.mqtt >= 2.0.0 --- platypush/plugins/mqtt/_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/mqtt/_client.py b/platypush/plugins/mqtt/_client.py index a82cd1ba8..448f86af7 100644 --- a/platypush/plugins/mqtt/_client.py +++ b/platypush/plugins/mqtt/_client.py @@ -37,7 +37,7 @@ class MqttClient(mqtt.Client, threading.Thread): **kwargs, ): self.client_id = client_id or str(Config.get('device_id')) - mqtt.Client.__init__(self, *args, client_id=self.client_id, **kwargs) + mqtt.Client.__init__(self, mqtt.CallbackAPIVersion.VERSION1, *args, client_id=self.client_id, **kwargs) threading.Thread.__init__(self, name=f'MQTTClient:{self.client_id}') self.logger = logging.getLogger(self.__class__.__name__)