Do not reset ble tracker adapter to read battery (#44229)

Do not reset the adapter to read the battery status, to avoid issues
in devices installations without sudo
This commit is contained in:
guillempages 2021-01-26 22:17:46 +01:00 committed by GitHub
parent 352d0870e3
commit 67fcdc5a9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,7 @@ def setup_scanner(hass, config, see, discovery_info=None):
):
handle = None
try:
adapter.start(reset_on_start=True)
adapter.start(reset_on_start=False)
_LOGGER.debug("Reading battery for Bluetooth LE device %s", mac)
bt_device = adapter.connect(mac)
# Try to get the handle; it will raise a BLEError exception if not available