summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/discover.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/discover.py b/src/discover.py
index d0d13fe..1632af6 100644
--- a/src/discover.py
+++ b/src/discover.py
@@ -6,4 +6,11 @@ async def discover():
devices = await BleakScanner.discover()
return [{"name": device.name, "address": device.address} for device in devices]
except Exception:
- return [] \ No newline at end of file
+ return []
+
+async def main():
+ devices = await discover()
+ print(devices)
+
+if __name__ == "__main__":
+ asyncio.run(main()) \ No newline at end of file
git.ajschof.me — hosted by ajschofield — powered by cgit