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
     print_bar(0, 0, w, "s")
27
     print_bar(0, 0, w, "s")
28
     for i in range(0, w):
28
     for i in range(0, w):
29
         await asyncio.sleep(t / w)
29
         await asyncio.sleep(t / w)
30
-        print_bar(i, 0, w, "s")
30
+        print_bar(i + 1, 0, w, "s")
31
     print()
31
     print()
32
 
32
 
33
 async def wait_for_temp(client, temp):
33
 async def wait_for_temp(client, temp):
81
     print("Connecting...")
81
     print("Connecting...")
82
     async with device as client:
82
     async with device as client:
83
         try:
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
             print("Starting Workflow")
88
             print("Starting Workflow")
85
             await flow(client)
89
             await flow(client)
86
         except:
90
         except:

Loading…
Cancel
Save