Skip to content

Commit

Permalink
mqtt.CallbackAPIVersion.VERSION2
Browse files Browse the repository at this point in the history
  • Loading branch information
aneisch committed Feb 17, 2024
1 parent 216c577 commit 18a1f9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thermostat_api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def do_POST(self):
class ThreadingSimpleServer(ThreadingMixIn, HTTPServer):
pass

client = mqttClient.Client(f"thermostat_api_server_{thermostat_serial}")
client = mqttClient.Client(mqtt.CallbackAPIVersion.VERSION2, f"thermostat_api_server_{thermostat_serial}")
if "mqtt_username" in locals():
client.username_pw_set(username=mqtt_username,password=mqtt_password)
server = ThreadingSimpleServer(('0.0.0.0', 8080), MyHttpRequestHandler)
Expand Down

0 comments on commit 18a1f9d

Please sign in to comment.