mirror of
https://github.com/home-assistant/core.git
synced 2026-09-17 22:19:00 +01:00
29 lines
762 B
Python
29 lines
762 B
Python
"""Constants for the network integration."""
|
|
|
|
from typing import Final
|
|
|
|
import probatio
|
|
|
|
from homeassistant.helpers import config_validation as cv
|
|
|
|
DOMAIN: Final = "network"
|
|
STORAGE_KEY: Final = "core.network"
|
|
STORAGE_VERSION: Final = 1
|
|
|
|
ATTR_ADAPTERS: Final = "adapters"
|
|
ATTR_CONFIGURED_ADAPTERS: Final = "configured_adapters"
|
|
DEFAULT_CONFIGURED_ADAPTERS: list[str] = []
|
|
|
|
LOOPBACK_TARGET_IP: Final = "127.0.0.1"
|
|
MDNS_TARGET_IP: Final = "224.0.0.251"
|
|
PUBLIC_TARGET_IP: Final = "8.8.8.8"
|
|
IPV4_BROADCAST_ADDR: Final = "255.255.255.255"
|
|
|
|
NETWORK_CONFIG_SCHEMA = probatio.Schema(
|
|
{
|
|
probatio.Optional(
|
|
ATTR_CONFIGURED_ADAPTERS, default=DEFAULT_CONFIGURED_ADAPTERS
|
|
): probatio.Schema(probatio.All(cv.ensure_list, [cv.string])),
|
|
}
|
|
)
|