From 9da08f76f13b2951329dea26594103ae26dbbf9f Mon Sep 17 00:00:00 2001 From: jerick Date: Mon, 28 Nov 2022 16:06:49 -0500 Subject: [PATCH] removing loop --- mqtt/tempSensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mqtt/tempSensor.py b/mqtt/tempSensor.py index 456e80f..fa5cd84 100644 --- a/mqtt/tempSensor.py +++ b/mqtt/tempSensor.py @@ -96,6 +96,6 @@ for proc in psutil.process_iter(): client = connect_mqtt() client.loop_start() print (sensor) -while True: - temp, humidity = getValues(sensor) - publish(client, temp, humidity) + +temp, humidity = getValues(sensor) +publish(client, temp, humidity)