From 9d66b6326654f499d352cfac071214646f471b3a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 19 Mar 2023 12:55:14 +0100 Subject: [PATCH] BluetoothService attributes fixes. BluetoothService IDs should always be in the format `address::uuid` and the name should always be in title format. --- platypush/plugins/bluetooth/_ble/_mappers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/bluetooth/_ble/_mappers.py b/platypush/plugins/bluetooth/_ble/_mappers.py index 4913ce4750..391e19fd00 100644 --- a/platypush/plugins/bluetooth/_ble/_mappers.py +++ b/platypush/plugins/bluetooth/_ble/_mappers.py @@ -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