Use hass.loop.create_future() for bluetooth (#100054)

This commit is contained in:
Jan Bouwhuis 2023-09-10 17:16:16 +02:00 committed by GitHub
parent 1a5f093397
commit 6899245020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ async def async_process_advertisements(
timeout: int,
) -> BluetoothServiceInfoBleak:
"""Process advertisements until callback returns true or timeout expires."""
done: Future[BluetoothServiceInfoBleak] = Future()
done: Future[BluetoothServiceInfoBleak] = hass.loop.create_future()
@hass_callback
def _async_discovered_device(