diff --git a/homeassistant/components/bluetooth/manifest.json b/homeassistant/components/bluetooth/manifest.json index 1ffee18d8fb..5e74f7b5561 100644 --- a/homeassistant/components/bluetooth/manifest.json +++ b/homeassistant/components/bluetooth/manifest.json @@ -18,9 +18,9 @@ "bleak==0.22.3", "bleak-retry-connector==3.9.0", "bluetooth-adapters==0.21.4", - "bluetooth-auto-recovery==1.4.5", + "bluetooth-auto-recovery==1.5.1", "bluetooth-data-tools==1.28.1", "dbus-fast==2.43.0", - "habluetooth==3.45.0" + "habluetooth==3.47.1" ] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index de493201acd..8b53ae13687 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -23,7 +23,7 @@ bcrypt==4.2.0 bleak-retry-connector==3.9.0 bleak==0.22.3 bluetooth-adapters==0.21.4 -bluetooth-auto-recovery==1.4.5 +bluetooth-auto-recovery==1.5.1 bluetooth-data-tools==1.28.1 cached-ipaddress==0.10.0 certifi>=2021.5.30 @@ -34,7 +34,7 @@ dbus-fast==2.43.0 fnv-hash-fast==1.5.0 go2rtc-client==0.1.2 ha-ffmpeg==3.2.2 -habluetooth==3.45.0 +habluetooth==3.47.1 hass-nabucasa==0.96.0 hassil==2.2.3 home-assistant-bluetooth==1.13.1 diff --git a/requirements_all.txt b/requirements_all.txt index d9a8d90ade0..d52a573d7bd 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -637,7 +637,7 @@ bluemaestro-ble==0.4.0 bluetooth-adapters==0.21.4 # homeassistant.components.bluetooth -bluetooth-auto-recovery==1.4.5 +bluetooth-auto-recovery==1.5.1 # homeassistant.components.bluetooth # homeassistant.components.ld2410_ble @@ -1118,7 +1118,7 @@ ha-silabs-firmware-client==0.2.0 habiticalib==0.3.7 # homeassistant.components.bluetooth -habluetooth==3.45.0 +habluetooth==3.47.1 # homeassistant.components.cloud hass-nabucasa==0.96.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 4ea60a459d1..20e4f5af2d1 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -562,7 +562,7 @@ bluemaestro-ble==0.4.0 bluetooth-adapters==0.21.4 # homeassistant.components.bluetooth -bluetooth-auto-recovery==1.4.5 +bluetooth-auto-recovery==1.5.1 # homeassistant.components.bluetooth # homeassistant.components.ld2410_ble @@ -960,7 +960,7 @@ ha-silabs-firmware-client==0.2.0 habiticalib==0.3.7 # homeassistant.components.bluetooth -habluetooth==3.45.0 +habluetooth==3.47.1 # homeassistant.components.cloud hass-nabucasa==0.96.0 diff --git a/tests/components/bluetooth/test_wrappers.py b/tests/components/bluetooth/test_wrappers.py index c5908776882..bfe7445f614 100644 --- a/tests/components/bluetooth/test_wrappers.py +++ b/tests/components/bluetooth/test_wrappers.py @@ -316,65 +316,6 @@ async def test_release_slot_on_connect_exception( cancel_hci1() -@pytest.mark.usefixtures("enable_bluetooth", "two_adapters") -async def test_we_switch_adapters_on_failure( - hass: HomeAssistant, - install_bleak_catcher, -) -> None: - """Ensure we try the next best adapter after a failure.""" - hci0_device_advs, cancel_hci0, cancel_hci1 = _generate_scanners_with_fake_devices( - hass - ) - ble_device = hci0_device_advs["00:00:00:00:00:01"][0] - client = bleak.BleakClient(ble_device) - - class FakeBleakClientFailsHCI0Only(BaseFakeBleakClient): - """Fake bleak client that fails to connect.""" - - async def connect(self, *args, **kwargs): - """Connect.""" - if "/hci0/" in self._device.details["path"]: - return False - return True - - with patch( - "habluetooth.wrappers.get_platform_client_backend_type", - return_value=FakeBleakClientFailsHCI0Only, - ): - assert await client.connect() is False - - with patch( - "habluetooth.wrappers.get_platform_client_backend_type", - return_value=FakeBleakClientFailsHCI0Only, - ): - assert await client.connect() is False - - # After two tries we should switch to hci1 - with patch( - "habluetooth.wrappers.get_platform_client_backend_type", - return_value=FakeBleakClientFailsHCI0Only, - ): - assert await client.connect() is True - - # ..and we remember that hci1 works as long as the client doesn't change - with patch( - "habluetooth.wrappers.get_platform_client_backend_type", - return_value=FakeBleakClientFailsHCI0Only, - ): - assert await client.connect() is True - - # If we replace the client, we should try hci0 again - client = bleak.BleakClient(ble_device) - - with patch( - "habluetooth.wrappers.get_platform_client_backend_type", - return_value=FakeBleakClientFailsHCI0Only, - ): - assert await client.connect() is False - cancel_hci0() - cancel_hci1() - - @pytest.mark.usefixtures("enable_bluetooth", "two_adapters") async def test_passing_subclassed_str_as_address( hass: HomeAssistant,