From 63aa46369b6413187eaf87c84f50ce198a67a511 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 8 Sep 2020 15:23:38 +0200 Subject: [PATCH] Copy instead of deepcopy the variables in a wait for trigger (#39796) --- homeassistant/helpers/script.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index 604102e6af3..74660f8b391 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -1,6 +1,5 @@ """Helpers to execute scripts.""" import asyncio -from copy import deepcopy from datetime import datetime, timedelta from functools import partial import itertools @@ -572,7 +571,7 @@ class _ScriptRun: "" if delay is None else f" (timeout: {timedelta(seconds=delay)})", ) - variables = deepcopy(self._variables) + variables = {**self._variables} self._variables["wait"] = {"remaining": delay, "trigger": None} async def async_done(variables, context=None):