Move local bluetooth scanner code into habluetooth library (#104970)
This commit is contained in:
parent
428c184c75
commit
b6245c834d
12 changed files with 180 additions and 592 deletions
|
@ -2,7 +2,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from bluetooth_adapters import BluetoothAdapters
|
||||
from bluetooth_auto_recovery import recover_adapter
|
||||
from bluetooth_data_tools import monotonic_time_coarse
|
||||
|
||||
from homeassistant.core import callback
|
||||
|
@ -69,11 +68,3 @@ def async_load_history_from_system(
|
|||
connectable_loaded_history[address] = service_info
|
||||
|
||||
return all_loaded_history, connectable_loaded_history
|
||||
|
||||
|
||||
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, mac_address)
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue