From 174b1ee6a9ab331f2b8ed80fa4a16f88d0951ca8 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 21 Mar 2023 16:03:01 +0100 Subject: [PATCH] Use a default list of excluded Bluetooth manufacturers. --- platypush/plugins/bluetooth/_plugin.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platypush/plugins/bluetooth/_plugin.py b/platypush/plugins/bluetooth/_plugin.py index 4f382add..1abf7b2b 100644 --- a/platypush/plugins/bluetooth/_plugin.py +++ b/platypush/plugins/bluetooth/_plugin.py @@ -77,11 +77,11 @@ class BluetoothPlugin(RunnablePlugin, EntityManager): _default_scan_duration: Final[float] = 10.0 """ Default duration of a discovery session (in seconds) """ - _default_excluded_manufacturers = { + _default_excluded_manufacturers = ( 'Apple, Inc.', 'Google', 'Microsoft', - } + ) """ Exclude beacons from these device manufacturers by default (main offenders when it comes to Bluetooth device space pollution). @@ -94,7 +94,9 @@ class BluetoothPlugin(RunnablePlugin, EntityManager): service_uuids: Optional[Collection[RawServiceClass]] = None, scan_paused_on_start: bool = False, poll_interval: float = _default_scan_duration, - excluded_manufacturers: Optional[Collection[str]] = None, + excluded_manufacturers: Optional[ + Collection[str] + ] = _default_excluded_manufacturers, **kwargs, ): """