Expose the Currently Logged-In User (current_users) in Lovelace and Templates and more #26343
-
📋 Summary Currently, Home Assistant does not natively expose which user is viewing or interacting with the Lovelace interface, making it difficult to personalize the UI or automations based on the logged-in user. We propose introducing a current_user context (or equivalent) that can be accessed in:
to dynamically adapt the smart home experience per user. 🎯 Goal of This Feature Home Assistant allows multiple users with different permission levels. However: ❌ There’s no way to dynamically access the currently logged-in user in Lovelace or templates; ✅ What We’re Proposing
🔧 Implementation Ideas Expose a structured current_user object, e.g.:
Make this object available in:
🧪 Real-World Use Cases 🔐 Security & Restrictions
📍 Presence
💡 Feature Suggestion Expose a native API or variables like:
Make them accessible in:
🙏 Thank You Several members of the French-speaking Home Assistant community have explored every available workaround. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 21 replies
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
I agree this doesn't really make sense. There is only one template usage in the frontend cards (markdown), and that supports the user variable. So what else is it missing from? Are you asking about custom cards, or are you really asking to support templates in more places? |
Beta Was this translation helpful? Give feedback.
Pending PR #26401 may (at least partially) provide what you're asking for.