Fix incorrect match examples for bluetooth (#1448)

This commit is contained in:
J. Nick Koston 2022-08-26 12:43:13 -05:00 committed by GitHub
parent e193131183
commit 377ba9ef34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -182,7 +182,7 @@ The following example will match service data with a 128 bit uuid used for Switc
{
"bluetooth": [
{
"service_uuid": ["cba20d00-224d-11e6-9fb8-0002a5d5c51b"]
"service_uuid": "cba20d00-224d-11e6-9fb8-0002a5d5c51b"
}
]
}
@ -194,7 +194,7 @@ If you want to match service data with a 16 bit uuid, you will have to convert i
{
"bluetooth": [
{
"service_data_uuid": ["0000fd3d-0000-1000-8000-00805f9b34fb"]
"service_data_uuid": "0000fd3d-0000-1000-8000-00805f9b34fb"
}
]
}

View File

@ -47,7 +47,7 @@ def _async_discovered_device(service_info: bluetooth.BluetoothServiceInfoBleak,
entry.async_on_unload(
bluetooth.async_register_callback(
hass, _async_discovered_device, {"service_uuids": {"cba20d00-224d-11e6-9fb8-0002a5d5c51b"}, "connectable": False}, bluetooth.BluetoothScanningMode.ACTIVE
hass, _async_discovered_device, {"service_uuid": "cba20d00-224d-11e6-9fb8-0002a5d5c51b", "connectable": False}, bluetooth.BluetoothScanningMode.ACTIVE
)
)
```