From c436d68a20dfdbadd2ddafbb1f34aa5d9e3df7db Mon Sep 17 00:00:00 2001 From: robert Date: Mon, 15 Feb 2021 23:27:34 +0100 Subject: [PATCH] fix --- mqtt_publish_temp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mqtt_publish_temp.py b/mqtt_publish_temp.py index 7a2ac6c..5acea41 100644 --- a/mqtt_publish_temp.py +++ b/mqtt_publish_temp.py @@ -48,7 +48,7 @@ while True: # Get Temperature from DHT _, temperature = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN) - print("temperature before cut: " + temperature) + print("temperature before cut: " + str(temperature)) # cut temperature to xx.xx if more then tow digits after "." t_split = temperature.split(".") if len(t_split[1]) > 2: @@ -56,7 +56,7 @@ while True: t_split[1] = t_split[1][:-t_cut] temperature = t_split[0] + "." + t_split[1] - print("temperature after cut: " + str(temperature)) + print("temperature after cut: " + temperature) # Get Humidity from DHT humidity, _ = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN)