mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 12:15:33 +01:00
Allow simple hostname for sntp servers (#2300)
This commit is contained in:
parent
dd3f2f6c7e
commit
d437cc915c
@ -16,7 +16,7 @@ CONFIG_SCHEMA = time_.TIME_SCHEMA.extend(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(SNTPComponent),
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user