From 62082bdf14d92ff751bb51eb2c4076315a96abb8 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 29 Apr 2026 08:51:57 +0200 Subject: [PATCH] Use modern condition API in script helper (#169355) --- homeassistant/helpers/script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index 0947ddc90d1d..3b4ba9e2560c 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -702,7 +702,7 @@ class _ScriptRun: with trace_path(condition_path): for idx, cond in enumerate(conditions): with trace_path(str(idx)): - if cond(hass, variables) is False: + if cond.async_check(variables=variables) is False: return False except exceptions.ConditionError as ex: self._log( @@ -753,7 +753,7 @@ class _ScriptRun: trace_element = trace_stack_top(trace_stack_cv) if trace_element: trace_element.reuse_by_child = True - check = cond(self._hass, self._variables) + check = cond.async_check(variables=self._variables) except exceptions.ConditionError as ex: self._log("Error in 'condition' evaluation:\n%s", ex, level=logging.WARNING) check = False