Per user Default view

Is there anyway to set a default view per user? Or maybe a way to automate setting a specific view when a user logs in.

This has per user settings. Not sure if it can set the default view:

That is for mobile display from what I see. I am just looking for a way for a user (PERSON) to have a default landing tab (view). Seems something like this would have already been a user profile option.

Nah, it does a lot more than browser agent detection.

I have it setup so different user login’s hide or see only specific tabs.
It should do what you need.

I think he wants to setup different home pages per user. Hiding tabs won’t change the homepage unless you use redirect (which would make that page unusable for set user when it is hidden). So if he is looking for setting a default tab per user without hiding anything than no, he won’t be able to do that:

I already asked the dev if it was possible to set a default tab, he told me he was working on it. I too am waiting for this.

It depends on what you are trying to do.
Home page is the first visible tab so User 1 you create their home page with tab 1 visible and tab 2 hidden. User 2 you make tab 1 hidden and tab 2 visible.
For me, my family has tab 1 visible and is the default they still see tabs 3, 4 and 5.
My login has tab 1 hidden and 2 visible which is my default and still see tabs 3, 4 and 5.
My “Garage” user only sees tab 5 which is it’s default view.

I have 3 tabs in my UI, Home, System Info and Touch. I have a user called touch. When touch logs in I want it to be on the Touch tab for that user by default. Yes they can probably navigate to the other tabs if they wanted to but this is going to be running on tablet in my living room so I can access all the CONTROLs in one tab easily. that is my goal.

You have an example of how you are doing that? Sounds like what I am after.

It’s kind of hard to tell in the raw text but it is easier to setup in the lovelace GUI. I also hide the menu buttons etc. for the Garage User

type: 'custom:compact-custom-header'
main_config: true
path: default_view
voice: hide    
  - conditions:
      user: Sleep
      chevrons: true
      hide_tabs: '1'
      menu: hide
      notifications: hide
      options: hide
  - conditions:
      user: 'Garage'
      chevrons: false
      hide_tabs: '0,1,2,3,5'
      menu: hide
      options: hide

Cool, thanks. I will give it a try.

Where do you put this config entry?

The config is on the top in the raw config editor. With me it looks like this:

    - conditions:
        user: baby
        chevrons: false
        disable_sidebar: true
        hide_help: true
        hide_tabs: '5,8,9,13,14,15,16,17,18,19,20'
        hide_unused: true
        menu: hide
        notifications: hide
        options: hide
        voice: hide
  - type: module
    url: /community_plugin/compact-custom-header/compact-custom-header.js
title: Home
  - badges:
      - sensor.moonphase
      - sensor.time
      - sun.sun


1 Like

This works reasonably well but it still allows the user to change the URL. I have two tabs, ‘admin’ and ‘kids’. By using the cch exceptions, I can show or hide the tabs per user. If I login as ‘kid’, I only see the ‘kids’ tab but I can still change the URL to go to the admin tab. Is there any way to avoid this?

Short answer is no, I don’t think so.
The only thing that I can think of is putting your device in full screen or some sort of kiosk mode so you can’t manually type in the url.

After some research, I would like to provide my solution to Per user Default View.

  • Install Custom Header (easy way is with HACS)
  • In Raw Config Editor, complet the CH installation by add the following line
  - url: /community_plugin/custom-header/custom-header.js
    type: module
  • For each users tabs, add user name in the path (case sensitive)
  path: home_Wolf
  • Finally add the following in customer_header:
default_tab: 'home_{{ user }}'

Alternatively: You can also do the last portion via custom header UI by adding the following in Custom Editor in Tabs section in default tab:

home_{{ user }}

PS: I believe this should be a nice feature to add in Home Assistant Users page and each user should have an option to select their default landing page.

1 Like

It would be nice if this feature was implemented the same way “Always hide the sidebar” is implemented under “Profile” settings. I.e. per user, per device. That way you don’t need to create a user for each device. The use case is that I want see different options depending on if I open home assistant on mobile, a panel dashboard, or my browser. Regardless, it’s all one person/user.

@jmwick what you’re describing can easily be done with this:

However, the reason I just found this string is that Home setter seems to have stopped working with 0.108. I’ll file an issue on Github.

@fmon Thanks, that would work. Home assistant 0.108 also implemented default dashboard selection from the profile page so that’s another option too.

I have to correct myself… apparently everyone is using custom header now, and home setter has gone stale.