Fixing local variable error

This commit is contained in:
2022-12-06 09:03:10 -05:00
parent b1de1a6d67
commit d363c6b2d1

View File

@@ -52,10 +52,11 @@ def getValues(sensor):
temp = round(temp, 2) temp = round(temp, 2)
#print("Temperature: {}*F Humidity: {}% ".format(temp, humidity)) #print("Temperature: {}*F Humidity: {}% ".format(temp, humidity))
result = 1 result = 1
return temp, humidity
except RuntimeError as error: except RuntimeError as error:
print(error.args[0]) print(error.args[0])
time.sleep(2.0) time.sleep(2.0)
return temp, humidity
def publish(client, temp, humidity): def publish(client, temp, humidity):