forked from bachya/simplisafe-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmfa
More file actions
executable file
·30 lines (24 loc) · 814 Bytes
/
Copy pathmfa
File metadata and controls
executable file
·30 lines (24 loc) · 814 Bytes
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
#!/usr/bin/env python
"""Get a list of all sensors in a system."""
import asyncio
import logging
import sys
from simplipy import get_api
from simplipy.errors import PendingAuthorizationError
async def main() -> None:
"""Run!"""
logging.basicConfig(level=logging.INFO)
while True:
try:
email = input("What is your SimpliSafe email address? ")
password = input("What is your SimpliSafe email password? ")
client_id = input("(optional) What is your SimpliSafe client ID? ")
await get_api(
email, password, client_id=client_id or None
)
except PendingAuthorizationError as err:
print(str(err))
sys.exit(0)
except KeyboardInterrupt:
sys.exit(0)
asyncio.run(main())