From 6195fc4d40475142fd17e7b20bd3abab87004953 Mon Sep 17 00:00:00 2001 From: jerick Date: Tue, 29 Nov 2022 16:51:12 -0500 Subject: [PATCH] Fixed timer position --- mqtt/tempSensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mqtt/tempSensor.py b/mqtt/tempSensor.py index f3d6af5..7f92645 100644 --- a/mqtt/tempSensor.py +++ b/mqtt/tempSensor.py @@ -79,7 +79,7 @@ def publish(client, temp, humidity): else: print(f"Failed to send message to topic {humidTopic}") - time.sleep(60.0) + while True: @@ -87,6 +87,6 @@ while True: client.loop_start() temp, humidity = getValues(sensor) publish(client, temp, humidity) - time.sleep (5.0) + time.sleep (60.0) client.loop_stop() #Stop loop client.disconnect() # disconnect