bitwarden

This commit is contained in:
jaydee 2024-06-08 23:32:48 +02:00
parent 524faaf09a
commit 99f052e8b1

View File

@ -238,8 +238,11 @@ if _PUBLISH:
print("Connected to MQTT Broker!")
else:
print("Failed to connect, return code %d\n", rc)
if paho.mqtt.__version__[0] > '1':
client = mqttClient.Client(mqttClient.CallbackAPIVersion.VERSION1)
else:
client = mqttClient.Client(client_id)
client = mqttClient.Client(client_id)
client.username_pw_set(username, password)
client.on_connect = on_connect
client.connect(MQTT_HOST, MQTT_PORT)