From b27753f886c47374cd05724c90781861f4437c08 Mon Sep 17 00:00:00 2001 From: Onkel Andy Date: Fri, 5 Jul 2024 21:13:07 +0200 Subject: [PATCH] stateengine plugin: fix se_status_eval when using structs (e.g. in se_use) --- stateengine/StateEngineCondition.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stateengine/StateEngineCondition.py b/stateengine/StateEngineCondition.py index c6d624713..2e1993b55 100755 --- a/stateengine/StateEngineCondition.py +++ b/stateengine/StateEngineCondition.py @@ -126,6 +126,8 @@ def check_items(self, check, value=None, item_state=None): self.__eval = value eval_value = value if check == "se_status_eval" or (check == "attribute" and self.__status_eval is None): + if check == "attribute": + value = _orig_value if value is None: value = StateEngineTools.find_attribute(self._sh, item_state, "se_status_eval_" + self.__name) if isinstance(value, str): @@ -475,7 +477,6 @@ def __convert(convert_value, convert_current): self.__updatedbynegate if valuetype == "updatedby" else\ self.__triggeredbynegate if valuetype == "triggeredby" else\ self.__negate - if isinstance(value, list): text = "Condition '{0}': {1}={2} negate={3} current={4}" _key = ['{}'.format(state.id), 'conditionsets', '{}'.format(self._abitem.get_variable('current.conditionset_name')), '{}'.format(self.__name), 'current', '{}'.format(valuetype)]