Allow no networks or AP to be set. (#1908)

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
Jesse Hills 2021-06-15 11:05:10 +12:00
parent 81959804df
commit d826416684
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -157,9 +157,7 @@ def _validate(config):
config[CONF_NETWORKS] = cv.ensure_list(WIFI_NETWORK_STA)(network)
if (CONF_NETWORKS not in config) and (CONF_AP not in config):
raise cv.Invalid(
"Please specify at least an SSID or an Access Point " "to create."
)
config[CONF_NETWORKS] = []
if config.get(CONF_FAST_CONNECT, False):
networks = config.get(CONF_NETWORKS, [])