diff --git a/googledevices/api/bluetooth.py b/googledevices/api/bluetooth.py index 9529a4d..d5eb390 100644 --- a/googledevices/api/bluetooth.py +++ b/googledevices/api/bluetooth.py @@ -89,6 +89,13 @@ async def get_scan_result(self): _LOGGER.error('Error connecting to %s - %s', self._ipaddress, error) + async def get_devices(self, sleep=5): + """Get bluetooth devices.""" + await self.scan_for_devices() + await asyncio.sleep(sleep) + await self.get_scan_result + return self.devices + async def scan_for_devices_multi_run(self, runs=2): """Scan for devices multiple times.""" run = 1