Here’s an example for a light:
The neat app Device Capabilities does the trick here
You can get the event source on a button with this flow, and create a flow + an advanced virtual device for every individual event.
Impression of output:
You can save the data to excel or the likes, when you log it to Simple Log f.i., instead of to the timeline. There’s also a Google Sheets app