Tap action on picture (read longer description)

So I have a few cameras configured to be shown i my UI and I’m using picture glance for those, by doing that I can also get some sensors in the same card.

I’m using the generic.camera using only jpeg updated once per second and that’s enough for me.

Today when I click the card, it opens up and gives me a new picture every second and what I’d like to achieve is by clicking somewhere (while the larger picture is open) to run a script, in my scenario I’d like to save a snapshot.

I’m able to run the script manually when closing the larger view, but then I don’t get the 1fps update and don’t really know what I’m taking a snapshot of.

Anyone got an idea on how to do this?