mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 07:28:10 +01:00
Allow no networks or AP to be set. (#1908)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
c411043681
commit
da7eb9ac90
1 changed files with 1 additions and 3 deletions
|
@ -157,9 +157,7 @@ def _validate(config):
|
||||||
config[CONF_NETWORKS] = cv.ensure_list(WIFI_NETWORK_STA)(network)
|
config[CONF_NETWORKS] = cv.ensure_list(WIFI_NETWORK_STA)(network)
|
||||||
|
|
||||||
if (CONF_NETWORKS not in config) and (CONF_AP not in config):
|
if (CONF_NETWORKS not in config) and (CONF_AP not in config):
|
||||||
raise cv.Invalid(
|
config[CONF_NETWORKS] = []
|
||||||
"Please specify at least an SSID or an Access Point " "to create."
|
|
||||||
)
|
|
||||||
|
|
||||||
if config.get(CONF_FAST_CONNECT, False):
|
if config.get(CONF_FAST_CONNECT, False):
|
||||||
networks = config.get(CONF_NETWORKS, [])
|
networks = config.get(CONF_NETWORKS, [])
|
||||||
|
|
Loading…
Reference in a new issue