Fixing local variable error
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user