mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 12:46:22 +01:00
Allow simple hostname for sntp servers (#2300)
This commit is contained in:
parent
a328fff5a7
commit
a32ad33b4e
@ -16,7 +16,7 @@ CONFIG_SCHEMA = time_.TIME_SCHEMA.extend(
|
|||||||
{
|
{
|
||||||
cv.GenerateID(): cv.declare_id(SNTPComponent),
|
cv.GenerateID(): cv.declare_id(SNTPComponent),
|
||||||
cv.Optional(CONF_SERVERS, default=DEFAULT_SERVERS): cv.All(
|
cv.Optional(CONF_SERVERS, default=DEFAULT_SERVERS): cv.All(
|
||||||
cv.ensure_list(cv.domain), cv.Length(min=1, max=3)
|
cv.ensure_list(cv.Any(cv.domain, cv.hostname)), cv.Length(min=1, max=3)
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
).extend(cv.COMPONENT_SCHEMA)
|
).extend(cv.COMPONENT_SCHEMA)
|
||||||
|
Loading…
Reference in New Issue
Block a user