Use a service's UUID as a name instead of Unknown if the service is unknown.

This commit is contained in:
Fabio Manganiello 2023-03-19 12:54:09 +01:00
parent aa04741daa
commit b568876474
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -216,7 +216,7 @@ def _parse_services(device: BLEDevice) -> List[BluetoothService]:
BluetoothService( BluetoothService(
id=f'{device.address}:{uuid}', id=f'{device.address}:{uuid}',
uuid=uuid, uuid=uuid,
name=str(srv_cls), name=f'[{uuid}]' if srv_cls == ServiceClass.UNKNOWN else str(srv_cls),
protocol=Protocol.L2CAP, protocol=Protocol.L2CAP,
is_ble=True, is_ble=True,
) )