Bump bluetooth-auto-recovery to 1.0.0 (#83800)

fixes https://github.com/home-assistant/core/issues/83673
pull/83870/head
J. Nick Koston 2022-12-12 00:49:57 -10:00 committed by Paulus Schoutsen
parent 753a4e9e5e
commit 4452a84ee0
6 changed files with 8 additions and 7 deletions

View File

@ -9,7 +9,7 @@
"bleak==0.19.2",
"bleak-retry-connector==2.10.1",
"bluetooth-adapters==0.12.0",
"bluetooth-auto-recovery==0.5.5",
"bluetooth-auto-recovery==1.0.0",
"bluetooth-data-tools==0.3.0",
"dbus-fast==1.75.0"
],

View File

@ -130,6 +130,7 @@ class HaScanner(BaseHaScanner):
new_info_callback: Callable[[BluetoothServiceInfoBleak], None],
) -> None:
"""Init bluetooth discovery."""
self.mac_address = address
source = address if address != DEFAULT_ADDRESS else adapter or SOURCE_LOCAL
super().__init__(hass, source, adapter)
self.mode = mode
@ -375,7 +376,7 @@ class HaScanner(BaseHaScanner):
# so we log at debug level. If we later come up with a repair
# strategy, we will change this to raise a repair issue as well.
_LOGGER.debug("%s: adapter stopped responding; executing reset", self.name)
result = await async_reset_adapter(self.adapter)
result = await async_reset_adapter(self.adapter, self.mac_address)
_LOGGER.debug("%s: adapter reset result: %s", self.name, result)
async def async_stop(self) -> None:

View File

@ -36,9 +36,9 @@ def async_load_history_from_system(
}
async def async_reset_adapter(adapter: str | None) -> bool | None:
async def async_reset_adapter(adapter: str | None, mac_address: str) -> bool | None:
"""Reset the adapter."""
if adapter and adapter.startswith("hci"):
adapter_id = int(adapter[3:])
return await recover_adapter(adapter_id)
return await recover_adapter(adapter_id, mac_address)
return False

View File

@ -13,7 +13,7 @@ bcrypt==3.1.7
bleak-retry-connector==2.10.1
bleak==0.19.2
bluetooth-adapters==0.12.0
bluetooth-auto-recovery==0.5.5
bluetooth-auto-recovery==1.0.0
bluetooth-data-tools==0.3.0
certifi>=2021.5.30
ciso8601==2.2.0

View File

@ -450,7 +450,7 @@ bluemaestro-ble==0.2.0
bluetooth-adapters==0.12.0
# homeassistant.components.bluetooth
bluetooth-auto-recovery==0.5.5
bluetooth-auto-recovery==1.0.0
# homeassistant.components.bluetooth
# homeassistant.components.led_ble

View File

@ -364,7 +364,7 @@ bluemaestro-ble==0.2.0
bluetooth-adapters==0.12.0
# homeassistant.components.bluetooth
bluetooth-auto-recovery==0.5.5
bluetooth-auto-recovery==1.0.0
# homeassistant.components.bluetooth
# homeassistant.components.led_ble