Copy instead of deepcopy the variables in a wait for trigger (#39796)

This commit is contained in:
Paulus Schoutsen committed 2020-09-08 15:35:30 +00:00
1 parent 02600bf190
commit 7f801faed1
1 file changed
+1 -2
+1 -2
View File
@@ -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):