From 992de497f25a93c2ff907e0df909c405485aa241 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 13 Aug 2024 11:55:37 +0200 Subject: [PATCH] Remove unnecessary assignment of Template.hass from script helper (#123780) --- homeassistant/helpers/script.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index a1b885d0c52..26a9b6e069e 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -669,7 +669,6 @@ class _ScriptRun: trace_set_result(wait=self._variables["wait"]) wait_template = self._action[CONF_WAIT_TEMPLATE] - wait_template.hass = self._hass # check if condition already okay if condition.async_template(self._hass, wait_template, self._variables, False): @@ -1429,7 +1428,6 @@ class Script: self._hass = hass self.sequence = sequence - template.attach(hass, self.sequence) self.name = name self.unique_id = f"{domain}.{name}-{id(self)}" self.domain = domain @@ -1459,8 +1457,6 @@ class Script: self._sequence_scripts: dict[int, Script] = {} self.variables = variables self._variables_dynamic = template.is_complex(variables) - if self._variables_dynamic: - template.attach(hass, variables) self._copy_variables_on_run = copy_variables @property