Skip to content

Commit

Permalink
Correction to keep compatibility with Paho 1.X
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit3 authored Mar 7, 2024
1 parent 9514a23 commit ad47764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Diematic32MQTT.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def haSendDiscoveryMessages(client, userdata, message):
hassio.addNumber('zone_B_temp_antiice',"Température Antigel Zone B",'zoneB/antiiceTemp','zoneB/antiiceTemp/set',5,20,0.5,"°C");


def on_connect(client, userdata, flags, reason_code, properties):
def on_connect(client, userdata, flags, reason_code, properties=None):
client.brokerConnected=True;
logger.critical('Connected to MQTT broker');
#subscribe to control messages with Q0s of 2
Expand All @@ -168,7 +168,7 @@ def on_connect(client, userdata, flags, reason_code, properties):



def on_disconnect(client, userdata, flags, reason_code, properties):
def on_disconnect(client, userdata, flags, reason_code, properties=None):
client.brokerConnected=False;
logger.critical('Diconnected from MQTT broker');

Expand Down

0 comments on commit ad47764

Please sign in to comment.