Fixed getValues arguments

This commit is contained in:
2022-11-28 15:53:54 -05:00
parent 168354eb96
commit 15b023ed40

View File

@@ -47,7 +47,7 @@ def connect_mqtt():
def getValues(): def getValues(sensor):
try: try:
temp = sensor.temperature temp = sensor.temperature
humidity = sensor.humidity humidity = sensor.humidity
@@ -96,8 +96,8 @@ def run():
client = connect_mqtt() client = connect_mqtt()
client.loop_start() client.loop_start()
while True: while True:
temp = getValues() temp = getValues(sensor)
humidity = getValues() humidity = getValues(sensor)
publish(client, temp, humidity) publish(client, temp, humidity)
if __name__ == '__main__': if __name__ == '__main__':