Custom Header

Themes im using is the goole light and google dark theme
light, then background is white indeed, so the color:#fff doesnt show indeed
on dark its ok cause background then is black

problem is, if i change it to dark, then it wont be good when using dark mode

so is there a way to put inside the header config to use white when theme dark mode
and use black when using theme light mode?

i tried changeing the flip div color, but i found 3x times the color in that config

The discussion of this unsupported feature really belongs in this thread and I’ve answered you there:
https://community.home-assistant.io/t/custom-header-template-showcase-and-discussion

@Mayker

i have a button on my home view that brings me to another view “persoon1”

With custom header i use the split mode so my tabs are at bottom.
In the tabs theres a tab “persoon1” too
I want to get rid of that tab , but when i use hide tab “persoon1” its gone which is good, but when i click the button on my home view, to bring me to that persoon1 view, its gone too

Is there a way to just hide it in the bottom tab , but not on my homepage?

hidden_tab_redirect: false

https://maykar.github.io/custom-header/#configuration/tabs

ah now i understand that setting!
superb, works

Just fo reverybody using the

user_agent: Mobile

condition, to identify the mobile app:

The user agent of the currently updated mobile app* has changed to:

Home Assistant/2020.1 (io.robbie.HomeAssistant; build:17; iOS 13.5.0) Alamofire/4.9.1

So you need to use another string (like “Alamofire” or “iOS”) for this to work.

*Home Assistant iOS app not available in App Store - #23 by SeanM

4 Likes

EDIT: Nevermind - please ignore below - just saw in the documentation that the editor is not available in YAML mode. I must not have noticed when I migrated to YAML mode a few months ago and thought it was a more recent issue.

I have a strange issue now where the custom header settings are no longer available in the top right menu. This seems to only happen in the dashboard that is controlled in yaml mode. I tried creating a new dashboard that is controlled via the UI and in this dashboard I can access the custom header settings in the top right.

I can confirm custom header is working in my default yaml dashboard and I tried setting

hide_ch_settings: false

but doesn’t help. I was able to hide the reload resources option by using

hide_reload_resources: true

Hi can you let me know, how you have done your layout? which theme do you use und how have you set up the cards with your beautiful pics? thank you Regards

I dont use a specific theme, as I have built the theme myself, it is called Homekit Infused. For the code and such you can find everything here.

Or check out my thread on this project here

For now I would suggest using the device_ID condition as the current user agent used in the iOS app contains no identifying information like “Mobile”, “iPad”, “iPhone”, “Safari”, etc. Also, I wouldn’t rely on using the full user agent shown in ObiKai’s post as it is likely to change as well, though I imagine the io.robbie.HomeAssistant bit will remain.

1 Like

Another heads up on this:

The iOS user agent is being modified in upcoming iOS app builds. Device names are returning ("iPhone", "iPad", etc). "Mobile" will no longer exist, but you’ll be able to replace that with either "Home Assistant" or "iOS" as they are now included in the apps user agent.

As a reminder, you can use multiple user agent strings by using the template condition as mentioned in this post above.

2 Likes

Hi
I’m interested by the Per user/device feature. Does that mean I can show/hide cards for specific users ?
I don’t find any documentation or example on this subject, can someone give me some tips ?
Thanks

The exceptions/conditions feature allows you to have different CH configs per user, device, and a fair few other conditions. This would allow you to show/hide entire views based on those conditions among other things.

You can read more about it the docs, but it sounds like what you want to do is conditionally hide a single card. This is something that is more suited for something like state-switch.

Thanks !
I’ll take a look !

I can’t see it on HACS. What am I doing wrong?

Couldn’t tell you. It’s included in HACS by default and found by going to “Frontend”, clicking the add button on the bottom right, and searching for “Custom Header”.

1 Like

Can someone help me out a bit and explain why this code isn’t working. Susanne and Lisa shouldn’t see the left side menu. Both running the Android app. Running the latest version of Home Assistant.

custom_header:
  active_tab_color: var(--state-icon-active-color)
  background: var(--app-header-background-color)
  chevrons: false
  compact_mode: true
  elements_color: var(--app-header-text-color)
  exceptions:
    - conditions:
        user: 'Susanne, Lisa'
      config:
        disable_sidebar: true
  footer_mode: true
  hidden_tab_redirect: false
  shadow: false
  tab_indicator_color: var(--state-icon-active-color)

Latest isn’t a version. Always say what version number you are using as you could be running the beta, a version could be released before someone sees your comment, etc.

What version of CH are you running? Do you get any errors pertaining to CH in your logs or in your browser’s dev tools (when logging in as one of those user’s in a browser)? Include any other information that may be helpful from the issues section of the docs.

Using your exact code and just replacing one of the user names with my own, I can confirm that everything is working as expected in the HA android app, mobile browser, and in multiple browsers on my PC. Are you sure that the user name’s are correct (case and all)? You can check this in the browser dev tools when logged in as one of those users or, if you are not using yaml mode, you can open custom headers settings and scroll to the bottom.

I’m running Home Assistant 111.4 and Custom Header 1.6.3.

The way I have it setup is that each family member has their own dashboard view in Lovelace with components relevant to them. In the app settings I have specified that each family member doesn’t have the default dashboard but the dashboard created for them. When I changed this in the app settings to “default” the left menu disappeared which is exactly what I wanted.

So in case you want to reproduce this bug/feature give that a try. This is fine but would be nice if I could set a user specific dashboard view other than the default one and still get this to work (if this is what is causing this issue for me).

Do you have custom header settings in each of the dashboards or only the default one?

Each dashboard operates independently, meaning you need to have CH settings in each one. This also means that each dashboard you’ve made wouldn’t really require exceptions, just the settings you want for that dashboard.

1 Like