Change manufacturer_data_first_byte to manufacturer_data_start (#75379)

This commit is contained in:
J. Nick Koston 2022-07-17 17:25:45 -05:00 committed by GitHub
parent a95c2c7850
commit 91f2550bc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 19 deletions

View file

@ -153,12 +153,12 @@ async def test_discovery_match_by_local_name(hass, mock_bleak_scanner_start):
async def test_discovery_match_by_manufacturer_id_and_first_byte(
hass, mock_bleak_scanner_start
):
"""Test bluetooth discovery match by manufacturer_id and manufacturer_data_first_byte."""
"""Test bluetooth discovery match by manufacturer_id and manufacturer_data_start."""
mock_bt = [
{
"domain": "homekit_controller",
"manufacturer_id": 76,
"manufacturer_data_first_byte": 0x06,
"manufacturer_data_start": [0x06, 0x02, 0x03],
}
]
with patch(
@ -174,7 +174,9 @@ async def test_discovery_match_by_manufacturer_id_and_first_byte(
hkc_device = BLEDevice("44:44:33:11:23:45", "lock")
hkc_adv = AdvertisementData(
local_name="lock", service_uuids=[], manufacturer_data={76: b"\x06"}
local_name="lock",
service_uuids=[],
manufacturer_data={76: b"\x06\x02\x03\x99"},
)
models.HA_BLEAK_SCANNER._callback(hkc_device, hkc_adv)