Skip to content

Commit

Permalink
fix: made MQTT connection result a little more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
fetzu authored May 14, 2024
1 parent 20f602b commit 4b19593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teslamate_mqtt2abrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def niceNow():

def on_connect(client, userdata, flags, reason_code, properties): # The callback for when the client connects to the broker
# MQTT Error handling
logging.info("MQTT Connection returned result: {} Code {}.".format(mqtt.connack_string(reason_code),reason_code))
logging.info("MQTT Connection returned result: {} (reason code {}).".format(mqtt.connack_string(reason_code),reason_code))
if reason_code != 0:
sys.exit("Could not connect")
client.subscribe(f"teslamate/cars/{CARNUMBER}/#")
Expand Down

0 comments on commit 4b19593

Please sign in to comment.