Drop RSSI update workaround from bluetooth on linux (#75467)

It turns out we do not need these are we can check the discovered
device list to see if bluez is still seeing the device
This commit is contained in:
J. Nick Koston 2022-07-19 21:14:31 -05:00 committed by GitHub
parent 1626c53c13
commit 0f81d1d14a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,6 @@ from dataclasses import dataclass
from enum import Enum
import fnmatch
import logging
import platform
from typing import Final, TypedDict, Union
from bleak import BleakError
@ -217,20 +216,6 @@ def _ble_device_matches(
return True
@hass_callback
def async_enable_rssi_updates() -> None:
"""Bleak filters out RSSI updates by default on linux only."""
# We want RSSI updates
if platform.system() == "Linux":
from bleak.backends.bluezdbus import ( # pylint: disable=import-outside-toplevel
scanner,
)
scanner._ADVERTISING_DATA_PROPERTIES.add( # pylint: disable=protected-access
"RSSI"
)
class BluetoothManager:
"""Manage Bluetooth."""
@ -265,7 +250,6 @@ class BluetoothManager:
ex,
)
return
async_enable_rssi_updates()
install_multiple_bleak_catcher(self.scanner)
# We have to start it right away as some integrations might
# need it straight away.