Identify the user who made something

Hi everyone!

I have in my lovelace scripts, inputs boolean, switches… and I’d like to set an input text with the name of the user who turned on any of that entities.

Actually, what I need is to know who turned on the last time some entities. I dont mind if I have the user in an input text or any place, but it would be usefull having in the lovelace.

How can I do?