bettwaage-sidequest #2
1 changed files with 6 additions and 1 deletions
|
@ -153,8 +153,13 @@ async def log_bed_weights():
|
||||||
bl = r.get(f"{bett_ip}/sensor/bl/").json()["value"]
|
bl = r.get(f"{bett_ip}/sensor/bl/").json()["value"]
|
||||||
br = r.get(f"{bett_ip}/sensor/br/").json()["value"]
|
br = r.get(f"{bett_ip}/sensor/br/").json()["value"]
|
||||||
|
|
||||||
|
# Sanity check
|
||||||
|
if min([tl, tr, bl, br]) <= 0:
|
||||||
|
continue
|
||||||
|
|
||||||
add_weights_to_log(tl, tr, bl, br)
|
add_weights_to_log(tl, tr, bl, br)
|
||||||
check_for_change()
|
check_for_change()
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
logging.exception(ex)
|
logging.exception(ex)
|
||||||
await asyncio.sleep(1)
|
finally:
|
||||||
|
await asyncio.sleep(1)
|
||||||
|
|
Loading…
Reference in a new issue