mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Bump habluetooth to 2.3.1 (#108628)
This commit is contained in:
parent
e9a7870080
commit
8d4a1f475e
@ -20,6 +20,6 @@
|
|||||||
"bluetooth-auto-recovery==1.3.0",
|
"bluetooth-auto-recovery==1.3.0",
|
||||||
"bluetooth-data-tools==1.19.0",
|
"bluetooth-data-tools==1.19.0",
|
||||||
"dbus-fast==2.21.1",
|
"dbus-fast==2.21.1",
|
||||||
"habluetooth==2.2.0"
|
"habluetooth==2.3.1"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ dbus-fast==2.21.1
|
|||||||
fnv-hash-fast==0.5.0
|
fnv-hash-fast==0.5.0
|
||||||
ha-av==10.1.1
|
ha-av==10.1.1
|
||||||
ha-ffmpeg==3.1.0
|
ha-ffmpeg==3.1.0
|
||||||
habluetooth==2.2.0
|
habluetooth==2.3.1
|
||||||
hass-nabucasa==0.75.1
|
hass-nabucasa==0.75.1
|
||||||
hassil==1.5.2
|
hassil==1.5.2
|
||||||
home-assistant-bluetooth==1.12.0
|
home-assistant-bluetooth==1.12.0
|
||||||
|
@ -1007,7 +1007,7 @@ ha-philipsjs==3.1.1
|
|||||||
habitipy==0.2.0
|
habitipy==0.2.0
|
||||||
|
|
||||||
# homeassistant.components.bluetooth
|
# homeassistant.components.bluetooth
|
||||||
habluetooth==2.2.0
|
habluetooth==2.3.1
|
||||||
|
|
||||||
# homeassistant.components.cloud
|
# homeassistant.components.cloud
|
||||||
hass-nabucasa==0.75.1
|
hass-nabucasa==0.75.1
|
||||||
|
@ -812,7 +812,7 @@ ha-philipsjs==3.1.1
|
|||||||
habitipy==0.2.0
|
habitipy==0.2.0
|
||||||
|
|
||||||
# homeassistant.components.bluetooth
|
# homeassistant.components.bluetooth
|
||||||
habluetooth==2.2.0
|
habluetooth==2.3.1
|
||||||
|
|
||||||
# homeassistant.components.cloud
|
# homeassistant.components.cloud
|
||||||
hass-nabucasa==0.75.1
|
hass-nabucasa==0.75.1
|
||||||
|
@ -78,23 +78,16 @@ async def test_diagnostics(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
):
|
):
|
||||||
entry1 = MockConfigEntry(
|
|
||||||
domain=bluetooth.DOMAIN, data={}, unique_id="00:00:00:00:00:01"
|
|
||||||
)
|
|
||||||
entry1.add_to_hass(hass)
|
|
||||||
|
|
||||||
entry2 = MockConfigEntry(
|
entry2 = MockConfigEntry(
|
||||||
domain=bluetooth.DOMAIN, data={}, unique_id="00:00:00:00:00:02"
|
domain=bluetooth.DOMAIN, data={}, unique_id="00:00:00:00:00:02"
|
||||||
)
|
)
|
||||||
entry2.add_to_hass(hass)
|
entry2.add_to_hass(hass)
|
||||||
|
|
||||||
assert await hass.config_entries.async_setup(entry1.entry_id)
|
|
||||||
await hass.async_block_till_done()
|
|
||||||
assert await hass.config_entries.async_setup(entry2.entry_id)
|
assert await hass.config_entries.async_setup(entry2.entry_id)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
diag = await get_diagnostics_for_config_entry(hass, hass_client, entry1)
|
diag = await get_diagnostics_for_config_entry(hass, hass_client, entry2)
|
||||||
assert diag == {
|
expected = {
|
||||||
"adapters": {
|
"adapters": {
|
||||||
"hci0": {
|
"hci0": {
|
||||||
"address": "00:00:00:00:00:01",
|
"address": "00:00:00:00:00:01",
|
||||||
@ -180,33 +173,6 @@ async def test_diagnostics(
|
|||||||
"start_time": ANY,
|
"start_time": ANY,
|
||||||
"type": "HaScanner",
|
"type": "HaScanner",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"adapter": "hci0",
|
|
||||||
"discovered_devices_and_advertisement_data": [
|
|
||||||
{
|
|
||||||
"address": "44:44:33:11:23:45",
|
|
||||||
"advertisement_data": [
|
|
||||||
"x",
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
[],
|
|
||||||
-127,
|
|
||||||
-127,
|
|
||||||
[[]],
|
|
||||||
],
|
|
||||||
"details": None,
|
|
||||||
"name": "x",
|
|
||||||
"rssi": -127,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"last_detection": ANY,
|
|
||||||
"monotonic_time": ANY,
|
|
||||||
"name": "hci0 (00:00:00:00:00:01)",
|
|
||||||
"scanning": True,
|
|
||||||
"source": "00:00:00:00:00:01",
|
|
||||||
"start_time": ANY,
|
|
||||||
"type": "FakeHaScanner",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"adapter": "hci1",
|
"adapter": "hci1",
|
||||||
"discovered_devices_and_advertisement_data": [
|
"discovered_devices_and_advertisement_data": [
|
||||||
@ -242,6 +208,12 @@ async def test_diagnostics(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
diag_scanners = diag["manager"].pop("scanners")
|
||||||
|
expected_scanners = expected["manager"].pop("scanners")
|
||||||
|
assert diag == expected
|
||||||
|
assert sorted(diag_scanners, key=lambda x: x["name"]) == sorted(
|
||||||
|
expected_scanners, key=lambda x: x["name"]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@patch("homeassistant.components.bluetooth.HaScanner", FakeHaScanner)
|
@patch("homeassistant.components.bluetooth.HaScanner", FakeHaScanner)
|
||||||
@ -448,13 +420,7 @@ async def test_diagnostics_remote_adapter(
|
|||||||
"homeassistant.components.bluetooth.diagnostics.get_dbus_managed_objects",
|
"homeassistant.components.bluetooth.diagnostics.get_dbus_managed_objects",
|
||||||
return_value={},
|
return_value={},
|
||||||
):
|
):
|
||||||
entry1 = MockConfigEntry(
|
entry1 = hass.config_entries.async_entries(bluetooth.DOMAIN)[0]
|
||||||
domain=bluetooth.DOMAIN, data={}, unique_id="00:00:00:00:00:01"
|
|
||||||
)
|
|
||||||
entry1.add_to_hass(hass)
|
|
||||||
|
|
||||||
assert await hass.config_entries.async_setup(entry1.entry_id)
|
|
||||||
await hass.async_block_till_done()
|
|
||||||
connector = (
|
connector = (
|
||||||
HaBluetoothConnector(MockBleakClient, "mock_bleak_client", lambda: False),
|
HaBluetoothConnector(MockBleakClient, "mock_bleak_client", lambda: False),
|
||||||
)
|
)
|
||||||
@ -467,7 +433,7 @@ async def test_diagnostics_remote_adapter(
|
|||||||
|
|
||||||
diag = await get_diagnostics_for_config_entry(hass, hass_client, entry1)
|
diag = await get_diagnostics_for_config_entry(hass, hass_client, entry1)
|
||||||
|
|
||||||
assert diag == {
|
expected = {
|
||||||
"adapters": {
|
"adapters": {
|
||||||
"hci0": {
|
"hci0": {
|
||||||
"address": "00:00:00:00:00:01",
|
"address": "00:00:00:00:00:01",
|
||||||
@ -490,7 +456,7 @@ async def test_diagnostics_remote_adapter(
|
|||||||
"passive_scan": False,
|
"passive_scan": False,
|
||||||
"product": "Bluetooth Adapter 5.0",
|
"product": "Bluetooth Adapter 5.0",
|
||||||
"product_id": "aa01",
|
"product_id": "aa01",
|
||||||
"sw_version": "homeassistant",
|
"sw_version": ANY,
|
||||||
"vendor_id": "cc01",
|
"vendor_id": "cc01",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -568,33 +534,6 @@ async def test_diagnostics_remote_adapter(
|
|||||||
"start_time": ANY,
|
"start_time": ANY,
|
||||||
"type": "HaScanner",
|
"type": "HaScanner",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"adapter": "hci0",
|
|
||||||
"discovered_devices_and_advertisement_data": [
|
|
||||||
{
|
|
||||||
"address": "44:44:33:11:23:45",
|
|
||||||
"advertisement_data": [
|
|
||||||
"x",
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
[],
|
|
||||||
-127,
|
|
||||||
-127,
|
|
||||||
[[]],
|
|
||||||
],
|
|
||||||
"details": None,
|
|
||||||
"name": "x",
|
|
||||||
"rssi": -127,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"last_detection": ANY,
|
|
||||||
"monotonic_time": ANY,
|
|
||||||
"name": "hci0 (00:00:00:00:00:01)",
|
|
||||||
"scanning": True,
|
|
||||||
"source": "00:00:00:00:00:01",
|
|
||||||
"start_time": ANY,
|
|
||||||
"type": "FakeHaScanner",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"connectable": True,
|
"connectable": True,
|
||||||
"discovered_device_timestamps": {"44:44:33:11:23:45": ANY},
|
"discovered_device_timestamps": {"44:44:33:11:23:45": ANY},
|
||||||
@ -641,5 +580,12 @@ async def test_diagnostics_remote_adapter(
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diag_scanners = diag["manager"].pop("scanners")
|
||||||
|
expected_scanners = expected["manager"].pop("scanners")
|
||||||
|
assert diag == expected
|
||||||
|
assert sorted(diag_scanners, key=lambda x: x["name"]) == sorted(
|
||||||
|
expected_scanners, key=lambda x: x["name"]
|
||||||
|
)
|
||||||
|
|
||||||
cancel()
|
cancel()
|
||||||
unsetup()
|
unsetup()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user