From c73289aed9f105eb3b3866bae94e11cd537132ee Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 31 Aug 2025 17:13:03 -0500 Subject: [PATCH] Bump bluetooth-adapters to 2.1.0 and habluetooth to 5.3.0 (#151465) --- homeassistant/components/bluetooth/__init__.py | 2 +- homeassistant/components/bluetooth/manifest.json | 4 ++-- homeassistant/package_constraints.txt | 4 ++-- requirements_all.txt | 4 ++-- requirements_test_all.txt | 4 ++-- tests/components/bluetooth/test_diagnostics.py | 2 ++ tests/components/bluetooth/test_websocket_api.py | 5 +++++ 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/bluetooth/__init__.py b/homeassistant/components/bluetooth/__init__.py index e3428eb9b86..8568724c0b1 100644 --- a/homeassistant/components/bluetooth/__init__.py +++ b/homeassistant/components/bluetooth/__init__.py @@ -385,10 +385,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: f"Bluetooth adapter {adapter} with address {address} not found" ) passive = entry.options.get(CONF_PASSIVE) + adapters = await manager.async_get_bluetooth_adapters() mode = BluetoothScanningMode.PASSIVE if passive else BluetoothScanningMode.ACTIVE scanner = HaScanner(mode, adapter, address) scanner.async_setup() - adapters = await manager.async_get_bluetooth_adapters() details = adapters[adapter] if entry.title == address: hass.config_entries.async_update_entry( diff --git a/homeassistant/components/bluetooth/manifest.json b/homeassistant/components/bluetooth/manifest.json index 95bb5820423..5559e5e8710 100644 --- a/homeassistant/components/bluetooth/manifest.json +++ b/homeassistant/components/bluetooth/manifest.json @@ -17,10 +17,10 @@ "requirements": [ "bleak==1.0.1", "bleak-retry-connector==4.4.3", - "bluetooth-adapters==2.0.0", + "bluetooth-adapters==2.1.0", "bluetooth-auto-recovery==1.5.2", "bluetooth-data-tools==1.28.2", "dbus-fast==2.44.3", - "habluetooth==5.2.1" + "habluetooth==5.3.0" ] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 70f3409cdbd..729f5a5b975 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -22,7 +22,7 @@ awesomeversion==25.5.0 bcrypt==4.3.0 bleak-retry-connector==4.4.3 bleak==1.0.1 -bluetooth-adapters==2.0.0 +bluetooth-adapters==2.1.0 bluetooth-auto-recovery==1.5.2 bluetooth-data-tools==1.28.2 cached-ipaddress==0.10.0 @@ -34,7 +34,7 @@ dbus-fast==2.44.3 fnv-hash-fast==1.5.0 go2rtc-client==0.2.1 ha-ffmpeg==3.2.2 -habluetooth==5.2.1 +habluetooth==5.3.0 hass-nabucasa==1.0.0 hassil==3.2.0 home-assistant-bluetooth==1.13.1 diff --git a/requirements_all.txt b/requirements_all.txt index 991ecab9332..2d51b73bf5a 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -652,7 +652,7 @@ bluemaestro-ble==0.4.1 # bluepy==1.3.0 # homeassistant.components.bluetooth -bluetooth-adapters==2.0.0 +bluetooth-adapters==2.1.0 # homeassistant.components.bluetooth bluetooth-auto-recovery==1.5.2 @@ -1133,7 +1133,7 @@ ha-silabs-firmware-client==0.2.0 habiticalib==0.4.4 # homeassistant.components.bluetooth -habluetooth==5.2.1 +habluetooth==5.3.0 # homeassistant.components.cloud hass-nabucasa==1.0.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index fda94cc1667..346db31aed2 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -583,7 +583,7 @@ bluemaestro-ble==0.4.1 # bluepy==1.3.0 # homeassistant.components.bluetooth -bluetooth-adapters==2.0.0 +bluetooth-adapters==2.1.0 # homeassistant.components.bluetooth bluetooth-auto-recovery==1.5.2 @@ -994,7 +994,7 @@ ha-silabs-firmware-client==0.2.0 habiticalib==0.4.4 # homeassistant.components.bluetooth -habluetooth==5.2.1 +habluetooth==5.3.0 # homeassistant.components.cloud hass-nabucasa==1.0.0 diff --git a/tests/components/bluetooth/test_diagnostics.py b/tests/components/bluetooth/test_diagnostics.py index 5c4d8bda70d..599d6833163 100644 --- a/tests/components/bluetooth/test_diagnostics.py +++ b/tests/components/bluetooth/test_diagnostics.py @@ -297,6 +297,7 @@ async def test_diagnostics_macos( assert diag == { "adapters": { "Core Bluetooth": { + "adapter_type": None, "address": "00:00:00:00:00:00", "manufacturer": "Apple", "passive_scan": False, @@ -317,6 +318,7 @@ async def test_diagnostics_macos( }, "adapters": { "Core Bluetooth": { + "adapter_type": None, "address": "00:00:00:00:00:00", "manufacturer": "Apple", "passive_scan": False, diff --git a/tests/components/bluetooth/test_websocket_api.py b/tests/components/bluetooth/test_websocket_api.py index f12d77913a9..19693db4000 100644 --- a/tests/components/bluetooth/test_websocket_api.py +++ b/tests/components/bluetooth/test_websocket_api.py @@ -332,6 +332,7 @@ async def test_subscribe_scanner_details( "connectable": False, "name": "hci0 (00:00:00:00:00:01)", "source": "00:00:00:00:00:01", + "scanner_type": "unknown", } ] } @@ -349,6 +350,7 @@ async def test_subscribe_scanner_details( "connectable": False, "name": "hci3 (AA:BB:CC:DD:EE:33)", "source": "AA:BB:CC:DD:EE:33", + "scanner_type": "unknown", } ] } @@ -362,6 +364,7 @@ async def test_subscribe_scanner_details( "connectable": False, "name": "hci3 (AA:BB:CC:DD:EE:33)", "source": "AA:BB:CC:DD:EE:33", + "scanner_type": "unknown", } ] } @@ -399,6 +402,7 @@ async def test_subscribe_scanner_details_specific_scanner( "connectable": False, "name": "hci3 (AA:BB:CC:DD:EE:33)", "source": "AA:BB:CC:DD:EE:33", + "scanner_type": "unknown", } ] } @@ -412,6 +416,7 @@ async def test_subscribe_scanner_details_specific_scanner( "connectable": False, "name": "hci3 (AA:BB:CC:DD:EE:33)", "source": "AA:BB:CC:DD:EE:33", + "scanner_type": "unknown", } ] }