Prevent tilt_ble from matching generic ibeacons (#78722)

This commit is contained in:
J. Nick Koston 2022-09-19 19:57:18 -05:00 committed by GitHub
parent 4b2bea4972
commit 5829ff5aea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View File

@ -5,7 +5,8 @@
"documentation": "https://www.home-assistant.io/integrations/tilt_ble", "documentation": "https://www.home-assistant.io/integrations/tilt_ble",
"bluetooth": [ "bluetooth": [
{ {
"manufacturer_id": 76 "manufacturer_id": 76,
"manufacturer_data_start": [2, 21, 164, 149, 187]
} }
], ],
"requirements": ["tilt-ble==0.2.3"], "requirements": ["tilt-ble==0.2.3"],

View File

@ -281,6 +281,13 @@ BLUETOOTH: list[dict[str, bool | str | int | list[int]]] = [
{ {
"domain": "tilt_ble", "domain": "tilt_ble",
"manufacturer_id": 76, "manufacturer_id": 76,
"manufacturer_data_start": [
2,
21,
164,
149,
187,
],
}, },
{ {
"domain": "xiaomi_ble", "domain": "xiaomi_ble",

View File

@ -27,7 +27,9 @@ async def test_sensors(hass: HomeAssistant):
assert len(hass.states.async_all()) == 0 assert len(hass.states.async_all()) == 0
inject_bluetooth_service_info(hass, TILT_GREEN_SERVICE_INFO) inject_bluetooth_service_info(hass, TILT_GREEN_SERVICE_INFO)
await hass.async_block_till_done() await hass.async_block_till_done()
assert len(hass.states.async_all()) == 2 assert (
len(hass.states.async_all()) >= 2
) # may trigger ibeacon integration as well since tilt uses ibeacon
temp_sensor = hass.states.get("sensor.tilt_green_temperature") temp_sensor = hass.states.get("sensor.tilt_green_temperature")
assert temp_sensor is not None assert temp_sensor is not None