@leader21 said in Execute a rule by another rule:
but there is a possibility to execute the THEN part of a rule via api.
Well, not exactly. The code you’re referring to is using the execute-action
a service. This allows for executing an action string, but it is not referring to the action part of a specific rule. For example, the actionString
property may look like as follows:
{"actionString": "switch mySwitch off"}
It should also be noted that execute-action
can only handle a single action. It does not allow for an action statement with a complex action expression contain multiple actions.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law