From 92bbedfa5aef0b44cae8b256460f8a1a28fa0904 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 15 Jun 2021 08:48:18 +0200 Subject: [PATCH] Fix #1908 mutating input parameter --- esphome/components/wifi/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/wifi/__init__.py b/esphome/components/wifi/__init__.py index a701aa37e5..13d698d245 100644 --- a/esphome/components/wifi/__init__.py +++ b/esphome/components/wifi/__init__.py @@ -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):