Log which user tapped a dashboard button

Hi All,

What would be the simplest way to log which user of the companion app pressed a dashboard button?

I use dashboard buttons for a convenient way to unlock doors and open the garage using my phone, but I don’t get anything in the logbook to indicate whether the door was opened by the dashboard, or by which user.

A few times I’ve had to investigate how the garage door was opened when I wasn’t around. I have a few different interconnected devices and systems that could have opened it, most of them will show something in the logbook but I guess whatever happens on the companion app is all anonymous?

You add users and authentication and all this but then it doesn’t log anything about who does what on the app?

I think you can create an automation that triggers on the door entity opening. And in that automation this.context.user_id should have the user that initiated it

more info here: