Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager Class Reference
Inheritance diagram for homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager:
[legend]
Collaboration diagram for homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, IntegrationMatcher integration_matcher, BluetoothAdapters bluetooth_adapters, BluetoothStorage storage, BleakSlotManager slot_manager)
 
None async_rediscover_address (self, str address)
 
Callable[[], None] async_register_callback (self, BluetoothCallback callback, BluetoothCallbackMatcher|None matcher)
 
CALLBACK_TYPE async_register_scanner (self, BaseHaScanner scanner, int|None connection_slots=None)
 
None async_setup (self)
 
None async_stop (self, Event|None event=None)
 

Public Attributes

 hass
 
 storage
 

Private Member Functions

None _address_disappeared (self, str address)
 
None _async_logging_changed (self, Event|None event=None)
 
None _async_save_scanner_histories (self)
 
None _async_save_scanner_history (self, BaseHaScanner scanner)
 
None _async_trigger_matching_discovery (self, BluetoothServiceInfoBleak service_info)
 
None _async_unregister_scanner (self, BaseHaScanner scanner, CALLBACK_TYPE unregister)
 
None _discover_service_info (self, BluetoothServiceInfoBleak service_info)
 
None _handle_config_entry_removed (self, config_entries.ConfigEntry entry)
 

Private Attributes

 _callback_index
 
 _cancel_logging_listener
 
 _connectable_history
 
 _debug
 
 _integration_matcher
 

Static Private Attributes

tuple __slots__
 

Detailed Description

Manage Bluetooth for Home Assistant.

Definition at line 43 of file manager.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.__init__ (   self,
HomeAssistant  hass,
IntegrationMatcher  integration_matcher,
BluetoothAdapters  bluetooth_adapters,
BluetoothStorage  storage,
BleakSlotManager  slot_manager 
)
Init bluetooth manager.

Definition at line 54 of file manager.py.

Member Function Documentation

◆ _address_disappeared()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._address_disappeared (   self,
str  address 
)
private
Dismiss all discoveries for the given address.

Definition at line 138 of file manager.py.

◆ _async_logging_changed()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._async_logging_changed (   self,
Event | None   event = None 
)
private
Handle logging change.

Definition at line 72 of file manager.py.

◆ _async_save_scanner_histories()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._async_save_scanner_histories (   self)
private
Save the scanner histories.

Definition at line 222 of file manager.py.

◆ _async_save_scanner_history()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._async_save_scanner_history (   self,
BaseHaScanner  scanner 
)
private
Save the scanner history.

Definition at line 229 of file manager.py.

◆ _async_trigger_matching_discovery()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._async_trigger_matching_discovery (   self,
BluetoothServiceInfoBleak   service_info 
)
private
Trigger discovery for matching domains.

Definition at line 76 of file manager.py.

◆ _async_unregister_scanner()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._async_unregister_scanner (   self,
BaseHaScanner  scanner,
CALLBACK_TYPE   unregister 
)
private
Unregister a scanner.

Definition at line 236 of file manager.py.

◆ _discover_service_info()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._discover_service_info (   self,
BluetoothServiceInfoBleak  service_info 
)
private

Definition at line 104 of file manager.py.

◆ _handle_config_entry_removed()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._handle_config_entry_removed (   self,
config_entries.ConfigEntry  entry 
)
private
Handle config entry changes.

Definition at line 257 of file manager.py.

◆ async_rediscover_address()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.async_rediscover_address (   self,
str  address 
)
Trigger discovery of devices which have already been seen.

Definition at line 95 of file manager.py.

◆ async_register_callback()

Callable[[], None] homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.async_register_callback (   self,
BluetoothCallback  callback,
BluetoothCallbackMatcher | None  matcher 
)
Register a callback.

Definition at line 171 of file manager.py.

◆ async_register_scanner()

CALLBACK_TYPE homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.async_register_scanner (   self,
BaseHaScanner  scanner,
int | None   connection_slots = None 
)
Register a scanner.

Definition at line 243 of file manager.py.

◆ async_setup()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.async_setup (   self)
Set up the bluetooth manager.

Definition at line 147 of file manager.py.

◆ async_stop()

None homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.async_stop (   self,
Event | None   event = None 
)
Stop the Bluetooth integration at shutdown.

Definition at line 213 of file manager.py.

Member Data Documentation

◆ __slots__

tuple homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.__slots__
staticprivate
Initial value:
= (
"hass",
"storage",
"_integration_matcher",
"_callback_index",
"_cancel_logging_listener",
)

Definition at line 46 of file manager.py.

◆ _callback_index

homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._callback_index
private

Definition at line 66 of file manager.py.

◆ _cancel_logging_listener

homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._cancel_logging_listener
private

Definition at line 153 of file manager.py.

◆ _connectable_history

homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._connectable_history
private

Definition at line 150 of file manager.py.

◆ _debug

homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._debug
private

Definition at line 74 of file manager.py.

◆ _integration_matcher

homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager._integration_matcher
private

Definition at line 65 of file manager.py.

◆ hass

homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.hass

Definition at line 63 of file manager.py.

◆ storage

homeassistant.components.bluetooth.manager.HomeAssistantBluetoothManager.storage

Definition at line 64 of file manager.py.


The documentation for this class was generated from the following file: