diff --git a/teslamate_mqtt2abrp.py b/teslamate_mqtt2abrp.py index fa31e95..c757bc0 100644 --- a/teslamate_mqtt2abrp.py +++ b/teslamate_mqtt2abrp.py @@ -164,7 +164,7 @@ def niceNow(): ## [ MQTT ] # Initialize MQTT client and connect -client = mqtt.Client(f"teslamateToABRP-{CARNUMBER}") +client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2, f"teslamateToABRP-{CARNUMBER}") if MQTTUSERNAME is not None: if MQTTPASSWORD is not None: logging.debug("Using MQTT username: {} and password '******'".format(MQTTUSERNAME))