Skip to content

Commit

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

client = mqttClient.Client(mqtt.CallbackAPIVersion.VERSION2, f"thermostat_api_server_{thermostat_serial}")

client = mqttClient.Client(mqttClient.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 722a1b3

Please sign in to comment.