From b8c57041afdf9c72792756be0897e8ed4455afd4 Mon Sep 17 00:00:00 2001 From: Hristo Date: Mon, 5 Feb 2024 21:37:49 +0200 Subject: [PATCH] call the update function once when script starts --- src/rpi-cpu2mqtt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rpi-cpu2mqtt.py b/src/rpi-cpu2mqtt.py index 737425d..7cfb7cf 100644 --- a/src/rpi-cpu2mqtt.py +++ b/src/rpi-cpu2mqtt.py @@ -623,6 +623,7 @@ if __name__ == '__main__': thread1.start() if config.update: + update_status() # Start the update_status function in a new thread thread2 = threading.Thread(target=update_status) thread2.daemon = True # Set the daemon attribute to True