Bump habluetooth to 2.0.2 (#107097)

This commit is contained in:
J. Nick Koston 2024-01-04 02:45:47 -10:00 committed by GitHub
parent 6debd112af
commit 0ccf8ffbc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 4 deletions

View file

@ -20,6 +20,6 @@
"bluetooth-auto-recovery==1.2.3",
"bluetooth-data-tools==1.19.0",
"dbus-fast==2.21.0",
"habluetooth==2.0.1"
"habluetooth==2.0.2"
]
}

View file

@ -24,7 +24,7 @@ dbus-fast==2.21.0
fnv-hash-fast==0.5.0
ha-av==10.1.1
ha-ffmpeg==3.1.0
habluetooth==2.0.1
habluetooth==2.0.2
hass-nabucasa==0.75.1
hassil==1.5.1
home-assistant-bluetooth==1.11.0

View file

@ -998,7 +998,7 @@ ha-philipsjs==3.1.1
habitipy==0.2.0
# homeassistant.components.bluetooth
habluetooth==2.0.1
habluetooth==2.0.2
# homeassistant.components.cloud
hass-nabucasa==0.75.1

View file

@ -803,7 +803,7 @@ ha-philipsjs==3.1.1
habitipy==0.2.0
# homeassistant.components.bluetooth
habluetooth==2.0.1
habluetooth==2.0.2
# homeassistant.components.cloud
hass-nabucasa==0.75.1

View file

@ -367,6 +367,38 @@ async def test_we_switch_adapters_on_failure(
cancel_hci1()
async def test_passing_subclassed_str_as_address(
hass: HomeAssistant,
two_adapters: None,
enable_bluetooth: None,
install_bleak_catcher,
) -> None:
"""Ensure the client wrapper can handle a subclassed str as the address."""
_, cancel_hci0, cancel_hci1 = _generate_scanners_with_fake_devices(hass)
class SubclassedStr(str):
pass
address = SubclassedStr("00:00:00:00:00:01")
client = bleak.BleakClient(address)
class FakeBleakClient(BaseFakeBleakClient):
"""Fake bleak client."""
async def connect(self, *args, **kwargs):
"""Connect."""
return True
with patch(
"habluetooth.wrappers.get_platform_client_backend_type",
return_value=FakeBleakClient,
):
assert await client.connect() is True
cancel_hci0()
cancel_hci1()
async def test_raise_after_shutdown(
hass: HomeAssistant,
two_adapters: None,