mirror of
https://github.com/home-assistant/core.git
synced 2026-05-30 04:05:01 +01:00
43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
"""ESPHome constants."""
|
|
|
|
from typing import TYPE_CHECKING, Final
|
|
|
|
from awesomeversion import AwesomeVersion
|
|
|
|
from homeassistant.components.bluetooth import BluetoothScanningMode
|
|
from homeassistant.util.hass_dict import HassKey
|
|
|
|
if TYPE_CHECKING:
|
|
from .domain_data import DomainData
|
|
|
|
DOMAIN = "esphome"
|
|
|
|
ESPHOME_DATA: HassKey[DomainData] = HassKey(DOMAIN)
|
|
|
|
CONF_ALLOW_SERVICE_CALLS = "allow_service_calls"
|
|
CONF_SUBSCRIBE_LOGS = "subscribe_logs"
|
|
CONF_DEVICE_NAME = "device_name"
|
|
CONF_NOISE_PSK = "noise_psk"
|
|
CONF_BLUETOOTH_MAC_ADDRESS = "bluetooth_mac_address"
|
|
CONF_BLUETOOTH_SCANNING_MODE = "bluetooth_scanning_mode"
|
|
|
|
DEFAULT_ALLOW_SERVICE_CALLS = True
|
|
DEFAULT_NEW_CONFIG_ALLOW_ALLOW_SERVICE_CALLS = False
|
|
DEFAULT_BLUETOOTH_SCANNING_MODE = BluetoothScanningMode.AUTO.value
|
|
|
|
DEFAULT_PORT: Final = 6053
|
|
|
|
STABLE_BLE_VERSION_STR = "2026.5.1"
|
|
STABLE_BLE_VERSION = AwesomeVersion(STABLE_BLE_VERSION_STR)
|
|
PROJECT_URLS = {
|
|
"esphome.bluetooth-proxy": "https://esphome.github.io/bluetooth-proxies/",
|
|
}
|
|
# ESPHome always uses .0 for the changelog URL
|
|
STABLE_BLE_URL_VERSION = f"{STABLE_BLE_VERSION.major}.{STABLE_BLE_VERSION.minor}.0"
|
|
DEFAULT_URL = f"https://esphome.io/changelog/{STABLE_BLE_URL_VERSION}.html"
|
|
|
|
NO_WAKE_WORD: Final[str] = "no_wake_word"
|
|
|
|
WAKE_WORDS_DIR_NAME = "custom_wake_words"
|
|
WAKE_WORDS_API_PATH = "/api/esphome/wake_words"
|