From 6899245020232cf703a7bf6907e3b64f49398cad Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Sun, 10 Sep 2023 17:16:16 +0200 Subject: [PATCH] Use hass.loop.create_future() for bluetooth (#100054) --- homeassistant/components/bluetooth/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/bluetooth/api.py b/homeassistant/components/bluetooth/api.py index be35a9d255d..e364fd08e88 100644 --- a/homeassistant/components/bluetooth/api.py +++ b/homeassistant/components/bluetooth/api.py @@ -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(