What Caused Trigger


#1

1) Give a description of the problem
If I have a piston fire based on a change of 8 possible devices in the OR of 3 different IF statements, is there a way to know which one caused the trigger? This might happen if I have a motion detector in 4 different areas and potentially other devices. I do not want to test each individually since by the time I get to them all, the state may have changed.

2) What is the expected behavior?
Maybe there is an Index value that tells me which detector caused the piston to fire? Or, some other way?

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Enable full logging and look at the logs in the piston.


#3

You can write what device caused the trip to a variable and then send a notification:


#4

This is what I was looking for, thanks, I’ll try that.


#5

Won’t $currentEventDevice do that as well?