2022-07-08 23:55:31 +00:00
|
|
|
"""Constants for the Bluetooth integration."""
|
2022-08-17 00:52:53 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from datetime import timedelta
|
|
|
|
from typing import Final
|
2022-07-08 23:55:31 +00:00
|
|
|
|
|
|
|
DOMAIN = "bluetooth"
|
2022-07-22 18:19:53 +00:00
|
|
|
DEFAULT_NAME = "Bluetooth"
|
2022-07-25 14:52:35 +00:00
|
|
|
|
|
|
|
CONF_ADAPTER = "adapter"
|
|
|
|
|
|
|
|
MACOS_DEFAULT_BLUETOOTH_ADAPTER = "CoreBluetooth"
|
|
|
|
UNIX_DEFAULT_BLUETOOTH_ADAPTER = "hci0"
|
|
|
|
|
|
|
|
DEFAULT_ADAPTERS = {MACOS_DEFAULT_BLUETOOTH_ADAPTER, UNIX_DEFAULT_BLUETOOTH_ADAPTER}
|
2022-08-17 00:52:53 +00:00
|
|
|
|
|
|
|
SOURCE_LOCAL: Final = "local"
|
|
|
|
|
|
|
|
|
|
|
|
UNAVAILABLE_TRACK_SECONDS: Final = 60 * 5
|
|
|
|
START_TIMEOUT = 12
|
|
|
|
SCANNER_WATCHDOG_TIMEOUT: Final = 60 * 5
|
|
|
|
SCANNER_WATCHDOG_INTERVAL: Final = timedelta(seconds=SCANNER_WATCHDOG_TIMEOUT)
|