Added option command line argument (mac-address or uuid of device to scan for)
@@ -10,6 +10,7 @@ Updated on 2020-08-12 by hbldh <henrik.blidh@nedomkull.com>
import asyncio
import platform
+import sys
from bleak import BleakScanner
@@ -19,6 +20,8 @@ address = (
if platform.system() != "Darwin"
else "B9EA5233-37EF-4DD6-87A8-2A875E821C46" # <--- Change to your device's address here if you are using macOS
)
+if len(sys.argv) == 2:
+ address = sys.argv[1]
async def run():
