diff --git a/examples/mqtt.py b/examples/mqtt.py index bef2645..63cf6e1 100644 --- a/examples/mqtt.py +++ b/examples/mqtt.py @@ -31,7 +31,6 @@ def on_connect(client, userdata, flags, rc): def on_message(client, userdata, msg): print(f"`{msg.topic}`: `{msg.payload.decode()}`") - print("-----") Connected = False #global variable for the state of the connection @@ -69,6 +68,7 @@ client.subscribe(topic_houseBatteryLoadUnload) try: while True: time.sleep(1) + print("-----") except KeyboardInterrupt: print("exiting")