Sensor for detecting lovelace view

Hi,
is there any way to detect the currently used lovelace view?
I would like to use a script to react differently, depending on from where it got triggered by a button press…
Thanks a lot in advance!

Parameter on the script?

Not exactly what I was looking for, but definetly a working solution.
I had not thought of that.
Thanks! :slight_smile: