This commit is contained in:
xyj 2023-12-09 16:06:45 +08:00
parent b177247f61
commit 3107d92359
2 changed files with 2 additions and 4 deletions

View File

@ -195,6 +195,7 @@ def local():
def test():
while True:
time.sleep(10)
try:
data = {'ambient_temperature': 1,
'ambient_humidity': 1,
@ -218,8 +219,6 @@ def test():
add(t2)
except:
pass
finally:
time.sleep(10)
if __name__ == '__main__':

View File

@ -198,6 +198,7 @@ def t():
def test():
while True:
time.sleep(10)
try:
data = {'ambient_temperature': 1,
'ambient_humidity': 1,
@ -223,8 +224,6 @@ def test():
except Exception as e:
print(e)
pass
finally:
time.sleep(10)
def on_connect(client, userdata, flags, rc):