when I have a rule with many OR conditions (by purpose not using groups)… is there a way to know and use the item that actually is the reason for the rule execution?
e.g. when this rule fires… can I use the “causing” item in the then clause?
rule "one"
when
Item DW6_door changed to OPEN or //
Item DW1_door changed to OPEN or //
Item DW2_door changed to OPEN or //
Item DW3_door changed to OPEN or //
Item DW4_door changed to OPEN or //
Item DW5_door changed to OPEN or //
Item DWM1_door changed to OPEN or //
Item DWM2_door changed to OPEN or //
Item MS1_motion changed to ON
then
Not without using Groups or looping through each Item in the rule and checking their “lastUpdate” time (assuming you are using persistence on these Items).
There have been issues open for this for a time and some work done but it has not yet been completed or released.
If you are not using Groups because of the multiple updates per change problem, you can leave your triggers as is and still use the Group lastUpdate hack to determine which Item was most recently updated to get at the Item that triggered the rule, with all the usual caveats with timing and such.