So, all users have HA companion app installed on their mobile handset. Is it possible to obtain/read/get - wjatever - the name of the logged in user.
I ask because I have users who can press a button on the dashboard. When this button is pressed, the notify.mobile_app_ gets called (or will do !) but I need to work out, to which handset the system should send the HA push notification to. (the person who pressed the button).
TIA
Can’t believe such a fundamental function as obtaining the logged in user for the current instance, cannot be obtained.
I’ve noticed web socket/auth APIs but this is for 3rd party apps. I’m talking here of actually within HA itself, in the configuration.yaml, obtaining the current user.
Surely this isn’t a case of “sorry - can’t do” !?
I would certainly use the name of the currently logged in user, particularly related to UI variations…, please.
Custom-Header does exactly that.
David,
Yes, I use it there. Is the user available outside the context of custom-header?