File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 16
16
unlock_max_time = 3600 # max unlock is 1 hour
17
17
18
18
19
- def button ():
19
+ def button () -> None :
20
20
keepopen = False
21
21
lastopen = 0
22
22
while True :
@@ -54,7 +54,7 @@ def button():
54
54
r .publish ("door_action" , "OPEN" )
55
55
56
56
57
- async def doorlight ():
57
+ async def doorlight () -> None :
58
58
lighton = p .value == 1
59
59
try :
60
60
while True :
@@ -70,16 +70,17 @@ async def doorlight():
70
70
print ("doorlight done" , flush = True )
71
71
72
72
73
- async def runall ():
73
+ async def runall () -> None :
74
74
t_button = asyncio .create_task (asyncio .to_thread (button ))
75
75
t_doorlight = asyncio .create_task (doorlight ())
76
76
await t_button
77
77
await t_doorlight
78
78
79
79
80
- def main ():
80
+ def main () -> int :
81
81
print ("dsl_buttons running" , flush = True )
82
82
asyncio .run (runall ())
83
+ return 0
83
84
84
85
85
86
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments