Browse Source

exit when fahrenheit

Thomas Buck 1 year ago
parent
commit
d6db78f116
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      python-test/flow.py

+ 5
- 1
python-test/flow.py View File

@@ -27,7 +27,7 @@ async def sleep(t):
27 27
     print_bar(0, 0, w, "s")
28 28
     for i in range(0, w):
29 29
         await asyncio.sleep(t / w)
30
-        print_bar(i, 0, w, "s")
30
+        print_bar(i + 1, 0, w, "s")
31 31
     print()
32 32
 
33 33
 async def wait_for_temp(client, temp):
@@ -81,6 +81,10 @@ async def main(address):
81 81
     print("Connecting...")
82 82
     async with device as client:
83 83
         try:
84
+            if await get_unit_is_fahrenheit(client):
85
+                print("Imperial American scum is currently not supported :P")
86
+                sys.exit(42)
87
+
84 88
             print("Starting Workflow")
85 89
             await flow(client)
86 90
         except:

Loading…
Cancel
Save