Don’t think we’re seeing the complete rule.
But -
Every time that runs, it destroys the “handle” to any existing Timer. The timer continues, but you can’t communicate with it because you burnt your only lifeline.
But still the same, when the shutter r_kueche.state is 100 the log says Timer created, then I open the shutter again after 5 seconds and the log says timer canceled …but after the 10 seconds the log says
Timer activated and the SteckdoseKueche goes OFF
I will guess this is a UI entered rule.
You can use the code tab to show the complete rule, with triggers and conditions, in order to show us. This stuff does matter.
There are no"global" variables in UI entered rules. Every time your rule triggers, it destroys your only pointer to any existing timer.
This is a technique used in files-based DSL rules that you cannot use in GUI entered DSL rules. There is no workaround. You may use files based rules or you may use a different scripting language in GUI, most of which offer a version of variables surviving between runs of the same rule.