Get the identity / person of the one executed a script / switch

Hi,

I would love to have a script or switch which will allow me to allow opening the blinds when the one who trigger it is at home but block them from doing it when they are not. This is for the obvious security concerns. To achieve this I wondered if I can test in the script / template switch who was the user who triggered it and validate his location. Sadly, didn’t find how to do that.
Ami missing something? Is it possible to get the person who executed the operation? Any other way to achieve this?

Thanks, Tomer.

The only thing I can think of, is put the switches on a conditional Lovelace card, that only shows when the user is home. I don’t know if you can do this in an elegant way or if you’d have to have different dashboards for each user.

Assuming you have some form of presence detection that knows a household member is home, can’t you just prevent operation of the blinds if nobody is home?

@michaelblight, I can, but more accurate solution is to allow each of the household members can operate on his own location. I do agree that what you suggest is relevant workaround. Just wonder if I’m the first one who thinks about having “current person” in the script to be good idea.