diff --git a/homeassistant/components/yalexs_ble/manifest.json b/homeassistant/components/yalexs_ble/manifest.json index 78abb0fce30..c4f5b139c86 100644 --- a/homeassistant/components/yalexs_ble/manifest.json +++ b/homeassistant/components/yalexs_ble/manifest.json @@ -7,5 +7,8 @@ "dependencies": ["bluetooth"], "codeowners": ["@bdraco"], "bluetooth": [{ "manufacturer_id": 465 }], - "iot_class": "local_push" + "iot_class": "local_push", + "supported_brands": { + "august_ble": "August Bluetooth" + } } diff --git a/homeassistant/components/yalexs_ble/util.py b/homeassistant/components/yalexs_ble/util.py index a1c6fdf7d32..465f4487c0b 100644 --- a/homeassistant/components/yalexs_ble/util.py +++ b/homeassistant/components/yalexs_ble/util.py @@ -1,6 +1,8 @@ """The yalexs_ble integration models.""" from __future__ import annotations +import platform + from yalexs_ble import local_name_is_unique from homeassistant.components.bluetooth import ( @@ -23,8 +25,14 @@ def bluetooth_callback_matcher( local_name: str, address: str ) -> BluetoothCallbackMatcher: """Return a BluetoothCallbackMatcher for the given local_name and address.""" - if local_name_is_unique(local_name): + # On MacOS, coreblueooth uses UUIDs for addresses so we must + # have a unique local_name to match since the system + # hides the address from us. + if local_name_is_unique(local_name) and platform.system() == "Darwin": return BluetoothCallbackMatcher({LOCAL_NAME: local_name}) + # On every other platform we actually get the mac address + # which is needed for the older August locks that use the + # older version of the underlying protocol. return BluetoothCallbackMatcher({ADDRESS: address}) diff --git a/homeassistant/generated/supported_brands.py b/homeassistant/generated/supported_brands.py index 4e151f5578d..b4eaa9d8a06 100644 --- a/homeassistant/generated/supported_brands.py +++ b/homeassistant/generated/supported_brands.py @@ -12,5 +12,6 @@ HAS_SUPPORTED_BRANDS = ( "overkiz", "renault", "wemo", + "yalexs_ble", "zwave_js" )