Skip to content

Commit

Permalink
fix filters
Browse files Browse the repository at this point in the history
  • Loading branch information
drosoCode committed Aug 19, 2023
1 parent 6e0aaa9 commit dcbcf59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/bluerpc/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ def on_disconnect(self, fun):

async def start(self, client) -> bool:
"""Start the scanner"""
svc_filters = []
# only set filters if this is required by the worker (ex: android)
if client.settings.ble_filters_required:
svc_filters = await self._get_services()

self._scanner = BlueRPCBLEScanner(
client,
self._advertisement,
self._on_disconnect,
(await self._get_services()),
svc_filters,
True,
)
return (await self._scanner.start())
Expand Down

0 comments on commit dcbcf59

Please sign in to comment.