BluetoothService attributes fixes.

BluetoothService IDs should always be in the format `address::uuid` and
the name should always be in title format.
This commit is contained in:
Fabio Manganiello 2023-03-19 12:55:14 +01:00
parent 6e9263c4e4
commit 9d66b63266
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -277,8 +277,8 @@ def device_to_entity(device: BLEDevice, data: AdvertisementData) -> BluetoothDev
# Skip entities that we couldn't parse.
continue
entity.id = f'{parent_entity.id}:{prop}'
entity.name = prop
entity.id = f'{parent_entity.address}::{prop}'
entity.name = prop.title()
parent_entity.children.append(entity)
entity.parent = parent_entity