How to know who turned the light on?

Hello everyone,

I have a room with motion sensor (controlled via my paradox security system), once the motion is detected vera switch the light on and turn it off after 1 minute. The light is controlled by a fibaro controller (on/off) which is integrated into a wall switch.
In my case I need to override the timer setting somehow, if the light was manually turned on by a wall switch. So the main question is if it possible to detect that the light was switched on by a wall switch?

Any ideas? I’m not lucky at all on this forum, hopefully somebody will answer me this time!

Thanks!

The SmartSwitch plugin does something like this already.

Overall topic is here.
Note about how state changes are handled here.