Use a default list of excluded Bluetooth manufacturers.

This commit is contained in:
Fabio Manganiello 2023-03-21 16:03:01 +01:00
parent e9abb5cb9a
commit 174b1ee6a9
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -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,
):
"""