forked from platypush/platypush
If no matching services are found when connecting to a device, default to BLEManager.
GATT characteristics are not necessarily exposed as services.
This commit is contained in:
parent
d1cd6dd2af
commit
af125347d6
1 changed files with 3 additions and 4 deletions
|
@ -238,10 +238,9 @@ class BluetoothPlugin(RunnablePlugin, EntityManager):
|
||||||
else [srv for srv in device.services if srv.uuid == uuid]
|
else [srv for srv in device.services if srv.uuid == uuid]
|
||||||
)
|
)
|
||||||
|
|
||||||
assert matching_services, (
|
if not matching_services:
|
||||||
f'No service found on the device {device} for port={port}, '
|
# It could be a GATT characteristic, so try BLE
|
||||||
f'service_uuid={service_uuid}'
|
return self._managers[BLEManager]
|
||||||
)
|
|
||||||
|
|
||||||
srv = matching_services[0]
|
srv = matching_services[0]
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue