-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeepClean.py
More file actions
42 lines (38 loc) · 1.44 KB
/
DeepClean.py
File metadata and controls
42 lines (38 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import ApiController
import time
def deep_clean():
ApiController.send_action("LIGHT_CONTROL", "LIGHTS_ON")
ApiController.send_action("CLEAN_AQUARIUM", "EMPTY_BOMB_ON")
starting_time = time.time()
difference = 0
print("")
print("---------------------")
print("Empty the aquarium...")
print("---------------------")
while difference < 300:
difference = time.time() - starting_time
ApiController.send_action("CLEAN_AQUARIUM", "EMPTY_BOMB_OFF")
ApiController.send_action("CLEAN_AQUARIUM", "COVER_UP")
print("")
print("-------------------------")
print("Press any key to continue")
input("-------------------------")
ApiController.send_action("CLEAN_AQUARIUM", "COVER_DOWN")
time.sleep(5)
ApiController.send_action("CLEAN_AQUARIUM", "FILLING_BOMB_ON")
starting_time = time.time()
difference = 0
print("")
print("-----------------------")
print("Filling the aquarium...")
print("-----------------------")
while difference < 120:
difference = time.time() - starting_time
ApiController.send_action("CLEAN_AQUARIUM", "FILLING_BOMB_OFF")
ApiController.send_action("CLEAN_AQUARIUM", "COVER_UP")
print("")
print("---------------------------------")
print("Press any key to end the cleaning")
input("---------------------------------")
ApiController.send_action("CLEAN_AQUARIUM", "COVER_DOWN")
ApiController.update_light_preferences()