Fix #1908 mutating input parameter

This commit is contained in:
Otto Winter 2021-06-15 08:48:18 +02:00 committed by GitHub
parent 86710ed483
commit 92bbedfa5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,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):
config = config.copy()
config[CONF_NETWORKS] = []
if config.get(CONF_FAST_CONNECT, False):