Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the Bluetooth integration."""
2 
3 from __future__ import annotations
4 
5 from typing import Final
6 
7 from habluetooth import ( # noqa: F401
8  CONNECTABLE_FALLBACK_MAXIMUM_STALE_ADVERTISEMENT_SECONDS,
9  FALLBACK_MAXIMUM_STALE_ADVERTISEMENT_SECONDS,
10  SCANNER_WATCHDOG_INTERVAL,
11  SCANNER_WATCHDOG_TIMEOUT,
12 )
13 
14 DOMAIN = "bluetooth"
15 
16 CONF_ADAPTER = "adapter"
17 CONF_DETAILS = "details"
18 CONF_PASSIVE = "passive"
19 
20 
21 SOURCE_LOCAL: Final = "local"
22 
23 DATA_MANAGER: Final = "bluetooth_manager"
24 
25 UNAVAILABLE_TRACK_SECONDS: Final = 60 * 5
26 
27 START_TIMEOUT = 15
28 
29 
30 # When the linux kernel is configured with
31 # CONFIG_FW_LOADER_USER_HELPER_FALLBACK it
32 # can take up to 120s before the USB device
33 # is available if the firmware files
34 # are not present
35 LINUX_FIRMWARE_LOAD_FALLBACK_SECONDS = 120
36 BLUETOOTH_DISCOVERY_COOLDOWN_SECONDS = 5