[const] Hoist the allowed ips key to the shared constants (#20053)

Co-authored-by: J. Nick Koston <nick@home-assistant.io>
This commit is contained in:
Bascht74
2026-10-02 19:14:51 +00:00
committed by GitHub
co-authored by J. Nick Koston
parent 25eaf1d025
commit fe5a155c13
3 changed files with 11 additions and 7 deletions
+2
View File
@@ -7,6 +7,7 @@ BYTE_ORDER_BIG = "big_endian"
CONF_ACCELEROMETER_ODR = "accelerometer_odr"
CONF_ACCELEROMETER_RANGE = "accelerometer_range"
CONF_ALLOWED_IPS = "allowed_ips"
CONF_B_CONSTANT = "b_constant"
CONF_BREATH_VOC_EQUIVALENT = "breath_voc_equivalent"
CONF_BYTE_ORDER = "byte_order"
@@ -15,6 +16,7 @@ CONF_CLIMATE_ID = "climate_id"
CONF_CO2_EQUIVALENT = "co2_equivalent"
CONF_COLOR_DEPTH = "color_depth"
CONF_COLUMNS = "columns"
CONF_CONNECTED = "connected"
CONF_CONVERSION_RATE = "conversion_rate"
CONF_CRC_ENABLE = "crc_enable"
CONF_DATA_BITS = "data_bits"
+2 -3
View File
@@ -1,6 +1,8 @@
import esphome.codegen as cg
from esphome.components import binary_sensor, socket, uart
from esphome.components.const import (
CONF_ALLOWED_IPS,
CONF_CONNECTED,
CONF_DATA_BITS,
CONF_HOST,
CONF_PARITY,
@@ -26,9 +28,6 @@ MULTI_CONF = True
tcp_uart_ns = cg.esphome_ns.namespace("tcp_uart")
TcpUart = tcp_uart_ns.class_("TcpUart", uart.UARTComponent, cg.Component)
CONF_ALLOWED_IPS = "allowed_ips"
CONF_CONNECTED = "connected"
BASE_SCHEMA = cv.Schema(
{
+7 -4
View File
@@ -1,6 +1,12 @@
import esphome.codegen as cg
from esphome.components import binary_sensor, socket, uart
from esphome.components.const import CONF_HOST, CONF_RECONNECT_INTERVAL, CONF_ROLE
from esphome.components.const import (
CONF_ALLOWED_IPS,
CONF_CONNECTED,
CONF_HOST,
CONF_RECONNECT_INTERVAL,
CONF_ROLE,
)
import esphome.config_validation as cv
from esphome.const import (
CONF_ID,
@@ -19,9 +25,6 @@ MULTI_CONF = True
uart_tcp_ns = cg.esphome_ns.namespace("uart_tcp")
UartTcp = uart_tcp_ns.class_("UartTcp", cg.Component, uart.UARTDevice)
CONF_ALLOWED_IPS = "allowed_ips"
CONF_CONNECTED = "connected"
BASE_SCHEMA = cv.Schema(
{