From 7ef88f550f64078bf3e764c7e8565d41c80a6646 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 23 Apr 2026 17:17:36 +0200 Subject: [PATCH] Adjust compound conditions --- homeassistant/helpers/condition.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/helpers/condition.py b/homeassistant/helpers/condition.py index ebd2235a8397..f4bd8ef61025 100644 --- a/homeassistant/helpers/condition.py +++ b/homeassistant/helpers/condition.py @@ -1119,13 +1119,13 @@ class AndConditionChecker(CompoundConditionChecker): """Condition checker for 'and' compound conditions.""" @callback - def _async_check(self, variables: TemplateVarsType, **kwargs: Any) -> bool: + def _async_check(self, **kwargs: Unpack[ConditionCheckParams]) -> bool: """Test and condition.""" errors = [] for index, check in enumerate(self._checks): try: with trace_path(["conditions", str(index)]): - if check(self._hass, variables, **kwargs) is False: + if check(self._hass, **kwargs) is False: return False except ConditionError as ex: errors.append( @@ -1153,13 +1153,13 @@ class OrConditionChecker(CompoundConditionChecker): """Condition checker for 'or' compound conditions.""" @callback - def _async_check(self, variables: TemplateVarsType, **kwargs: Any) -> bool: + def _async_check(self, **kwargs: Unpack[ConditionCheckParams]) -> bool: """Test or condition.""" errors = [] for index, check in enumerate(self._checks): try: with trace_path(["conditions", str(index)]): - if check(self._hass, variables) is True: + if check(self._hass, **kwargs) is True: return True except ConditionError as ex: errors.append( @@ -1187,13 +1187,13 @@ class NotConditionChecker(CompoundConditionChecker): """Condition checker for 'not' compound conditions.""" @callback - def _async_check(self, variables: TemplateVarsType, **kwargs: Any) -> bool: + def _async_check(self, **kwargs: Unpack[ConditionCheckParams]) -> bool: """Test not condition.""" errors = [] for index, check in enumerate(self._checks): try: with trace_path(["conditions", str(index)]): - if check(self._hass, variables, **kwargs): + if check(self._hass, **kwargs): return False except ConditionError as ex: errors.append(