From e661068c69f92065abf1909da0646854a8d4e9cb Mon Sep 17 00:00:00 2001 From: jerick Date: Mon, 28 Nov 2022 15:33:08 -0500 Subject: [PATCH] on_connect fix --- mqtt/tempSensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mqtt/tempSensor.py b/mqtt/tempSensor.py index 393c09c..c5765ff 100644 --- a/mqtt/tempSensor.py +++ b/mqtt/tempSensor.py @@ -31,7 +31,7 @@ sensor = adafruit_dht.DHT11(board.D20) # client.on_connect = on_connect # client.connect(broker, port) def connect_mqtt(): - def on_connect(client, rc): + def on_connect(client, userdata, flags, rc): if rc == 0: print("Connected to MQTT Broker!") else: