Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the network integration."""
2 
3 from __future__ import annotations
4 
5 from typing import Final
6 
7 import voluptuous as vol
8 
10 
11 DOMAIN: Final = "network"
12 STORAGE_KEY: Final = "core.network"
13 STORAGE_VERSION: Final = 1
14 
15 DATA_NETWORK: Final = "network"
16 
17 ATTR_ADAPTERS: Final = "adapters"
18 ATTR_CONFIGURED_ADAPTERS: Final = "configured_adapters"
19 DEFAULT_CONFIGURED_ADAPTERS: list[str] = []
20 
21 LOOPBACK_TARGET_IP: Final = "127.0.0.1"
22 MDNS_TARGET_IP: Final = "224.0.0.251"
23 PUBLIC_TARGET_IP: Final = "8.8.8.8"
24 IPV4_BROADCAST_ADDR: Final = "255.255.255.255"
25 
26 NETWORK_CONFIG_SCHEMA = vol.Schema(
27  {
28  vol.Optional(
29  ATTR_CONFIGURED_ADAPTERS, default=DEFAULT_CONFIGURED_ADAPTERS
30  ): vol.Schema(vol.All(cv.ensure_list, [cv.string])),
31  }
32 )