Wireguard keepalive remove uint16 type (#5430)

This commit is contained in:
Guillermo Ruffino 2023-09-26 20:25:00 -03:00 committed by GitHub
parent 2f7a378c7b
commit 86db559f6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@ from esphome.const import (
CONF_REBOOT_TIMEOUT,
)
from esphome.components import time
from esphome.core import TimePeriod
CONF_NETMASK = "netmask"
CONF_PRIVATE_KEY = "private_key"
@ -59,9 +60,9 @@ CONFIG_SCHEMA = cv.Schema(
cv.Optional(CONF_PEER_ALLOWED_IPS, default=["0.0.0.0/0"]): cv.ensure_list(
_cidr_network
),
cv.Optional(CONF_PEER_PERSISTENT_KEEPALIVE, default=0): cv.Any(
cv.Optional(CONF_PEER_PERSISTENT_KEEPALIVE, default="0s"): cv.All(
cv.positive_time_period_seconds,
cv.uint16_t,
cv.Range(max=TimePeriod(seconds=65535)),
),
cv.Optional(
CONF_REBOOT_TIMEOUT, default="15min"