Custom Header

@xiki Not likely, this would require too many strange exceptions to how CH currently works.

@kruton No, this has to do with how Lovelace loads resources and the fact that CH needs certain elements and the config to exist before rendering.

@nick4 & @Steven_Rollason Can you add your full CH config to the issue for this on Github? I am unable to reproduce this one as of yet. Find the issue here.

2 Likes

Is it possible to get the header icons into two rows? I start to have so many tabs in my HA instance and on mobile it is not fun to scroll the header so I was wondering if it would be possible to have two rows?

No, the best solution to this issue is to use multiple dashboards.

Hello, almost a thousand posts… may I be so rude to just ask a few questions? I can’t get it working…

I want to limit some users some tabs and some “left menu items” added via panel_iframe.yaml.

What I don’t get:

  1. When I log in as a “user” and I open in lovelace the custom header section and I want to hide a tab, give the tab name and press “save and reload” nothing happens.
  2. Do I need to login per user and configure all custom header sections individually?
  3. how can I hide left pane menu items added via panel_iframe.yaml and others?

Thank you.

  1. Are you trying to hide a tab/view or a dashboard?
  2. No everything can be set up from one user.
  3. Custom Header doesn’t hide items from the sidebar. Custom Sidebar does this, but I didn’t make it.

A view I think it is called, I menad the tab in a lovelace dashboard.
But the other question goes about the left menu items (which can be a lovelace dashboard link).
So please answer for both.

But can everything be setup from 1 user, differently per user?
so my son and daughter have a different layout then my wife? and me?

Will look into this, thank you.

Your config would be setup once, not per user.
I would suggest checking out the docs, especially the section on exceptions. The examples are all in YAML, but this can all be setup using the Custom Header settings UI.

Please answer this… It seems nothing happens for me…

But this is what I am struggling with… I am not a coding expert but would really like to hide some tabs/links for user A and some for user B…

In custom header settings you add a new “exception” and under conditions fill out the user condition with the User’s name (not username, as mentioned in the readme). At the very bottom of the settings it shows you the current logged in user’s name. Then setup their config below, like hide tabs (which can be the tab’s index number, title, path, or a comma separated list of tabs). I cannot see what your config is or know exactly what you are doing to really give much more support than that.

You could even copy and paste the examples from the readme into your “raw config” (found after entering “configure ui”) and modify it to meet your needs.

Ok, got the first user hidden some tabs… thank you!

What about a tab with the name “OZW Network Map”, this does not hide (due to the spaces)?

Yeah that’s a bug, until it’s fixed you can either use that tabs index number (start counting tabs from zero) or give it a “path” of something simple and use that.

That works for now! Thank you.

next step: custom sidebar

sorry if this has been above me somewhere… only now started to create a second ‘dashboard’ and discovered these need their own set of

button_card_templates: !include lovelace/includes/button_card_templates.yaml
decluttering_templates: !include_dir_named lovelace/decluttering_templates
custom_header: !include lovelace/includes/custom_header.yaml

and can share the global resources in the configuration.yaml:

lovelace:
  mode: yaml
  resources: !include lovelace/resources.yaml

before I plunge into trying to create a dedicated custom header for the dashboard, please let me ask if I need a separate

custom_header: !include lovelace/includes/custom_header_dashboard.yaml

like that? Or should I have a dedicated section in the original (which not is in the ui-lovelace.yaml of course), and add to that?

Maybe this is not possible at all? Didn’t find anything on dashboard in the documentation, but that could be my fault…

thanks for having a look!

Yup, that’s how I would do it. Have a separate config for each dashboard, otherwise it could get confusing. If you really wanted to, each dashboard could link to the same include file that way it would avoid redundancies, but if you have any config that uses tab indexs or have tabs that share names between the two dashboards, etc. it could get messy.

1 Like

thanks Ryan, will continue as planned :wink:

the above is working nicely, almost 100%. So thanks! switching between dashboards sometimes flukes, I think it has to do with the naming of the views, which in 1 dashboard eg is Notify, and in the other Notify_settings. Seems it sometimes picks the wrong one. Must experiment further (but will rename the views to be as unique as possible in the meantime, as to be sure that’s not causing it)

other issue:

made an exception where I do want to show the options field, and a templated one at that. I dont want the options options to appear though, so this is what I got:

  - conditions:
      user: Gezin
    config:
      show_tabs: 0 to 3, 5, 11 to 13, 15 to 17
      voice_hide: true
      hide_refresh: true
      hide_reload_resources: true
      hide_help: true
#      options_hide: true

in the main config, the options is set to show and use the template.

Is this configured incorrectly ? I ask because it keeps giving me the ‘Herlaad bronnen’ in Dutch, which is ‘Reload resources’. cleared cache few times, reloaded, refreshed, ea…

Hi all, silly question maybe
Is it possible to have “navigate to” functionality instead of “voice” button
for example to return from any view to the preset view.

I’m getting a lof of follwing log entries and custom header only works after a few reloads

Protokolldetails ( ERROR )
Logger: frontend.js.latest.202008110
Source: components/system_log/__init__.py:193
First occurred: 16:39:12 (2 occurrences)
Last logged: 16:39:12

https://tanzerhome.duckdns.org:9123/hacsfiles/custom-header/custom-header.js:1:12943 Uncaught TypeError: Cannot read property 'hass' of null
https://tanzerhome.duckdns.org:9123/hacsfiles/lovelace-swipe-navigation/swipe-navigation.js:213:5 Uncaught TypeError: Cannot read property 'shadowRoot' of null

@Mariusthvdb Will look into it.

@kajmaj No, there is no such feature in CH

@deluxestyle Create an issue on the Github with the required information and make sure both are upgraded to the latest version.