Custom Header

Hi
I need some help to configure CG to my android mobile. Right now I have the following configuration which works ok in my latop but in my mobile I only see the last word of each sentence.
What can I do in order to see all the messages?

 header_text: >-
    <style> #flipper {color:#999;} #flip {height:24px;overflow:hidden;} #flip >
    div > div {color:#fff;height:24px;margin-bottom:24px;display:inline-block;}
    #flip div:first-child {animation: show 10s linear infinite;} @keyframes show
    { 0% {margin-top:-144px;} 5% {margin-top:-96px;} 33% {margin-top:-96px;} 38%
    {margin-top:-48px;} 66% {margin-top:-48px;} 76% {margin-top:0px;} 100%
    {margin-top:0px;}} #flipper p {position:fixed;color:#999; } </style> <div
    id=flipper><div id=flip><div><div>  OutTemp:
    {{states('sensor.outdoor_temperature_2')}}</div></div><div><div>
    {{states('sensor.dark_sky_daily_summary')}}</div></div><div><div>
    {{states('sensor.dark_sky_summary')}}</div></div><div><div> OutTemp:
    {{states('sensor.outdoor_temperature_2')}}</div></div><div><div>

What is the behaviour with exceptions if a something appears in two lists and there is a conflict?

e.g. if a view is hidden for mobile but explicitly shown for a user who happens to be using a mobile.

The exception with the highest number of condition matches is chosen first, in a situation like you describe (same number of matches) it will go in the order of how they are listed in the yaml, so whichever matches first. In the example below, if both match the user condition would be used and the background will be pink since itā€™s the first in the list.

  exceptions:
    - conditions:
        user: User
      config:
        background: pink
    - conditions:
        user_agent: Mobile
      config:
        background: purple
1 Like

Hello everyone, Iā€™m on HA 0.107.7, but getting error:

[homeassistant.config] Invalid config for [lovelace]: [custom_header] is an invalid option for [lovelace]. Check: lovelace->lovelace->custom_header.

I know that this version is pretty new, but there are some people here claiming other minor errors on 0.107.x, but I canā€™t start HA properly.
This is part of my config

lovelace:
  mode: yaml
  custom_header:
    compact_mode: true

Thanks for suggestions

Check the readme for how to configure. It does not happen in your configuration.yaml file like youā€™re attempting.

Hi,

Is it possible to run a script when tab is pressed? I want to set an input number to a specific value each time tab is pressed. Is there a way to do it?

Thx

Thanks, that works. I was a little bit confused since resources section moved from ui-lovelace.yaml to configuration.yaml in HA 0.107

I need to update the readme as well to reflect the 0.107 changes for resources etc, so that may have added to the confusion.

No, and I donā€™t think thatā€™s something I would add, sorry.

You would need to make a mobile exception that uses a modified version of that template. One that adds css to change the text size and possibly make the text 2 lines. Keep discussion of these things to this thread.

1 Like

please help i cant get out of kiosk mode
help help

thx
i was tryng with cch instead ch
thank you so much
i just wont kiosk mode for tablet, need to add exclusion, how to add

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

i am adding in HA exceptions - device id ex. - aa2233bb-1122aass
i add mobile phone and tablet, dont work

Hi I noticed a bug I hope you can fix or perhaps there is way around it. I have created my own UI with 8 tabs, of which I want 6 to be visible on the header (footer mode). The other 2 I want invisible but accessible (I created rooms and added a back button at the top to go back to the first tab). The issue is: when Iā€™m on the tab 7 and 8 (which are hidden from show_tabs) the screen scrolls back to the top after around 15-20 seconds. I have added ā€˜hidden_tab_redirect: falseā€™ so I can visit them fine by using a navigate action service. But then Iā€™m scrolling through my view, checking my cards and them BAM it scrolls back to the top of the page.

When I removed the tabs as hidden, it all worked fine (took me a while to figure out this was the issue). Is there a way this can be fixed? I want to access the tabs, I just donā€™t want them on the headerā€¦

This is my CH config btw (just in case)

custom_header:
  hidden_tab_redirect: false
  chevrons: false
  compact_mode: true
  exceptions:
    - conditions:
        user: User1
        user_agent: Mobile
      config:
        show_tabs: '0,1,2,3,4,5'
    - conditions:
        user: User2
        user_agent: Mobile
      config:
        show_tabs: '0,1,2,3,4,6'
        disable_sidebar: true
  all_tabs_css: 'width: calc(16vw - 3.6px) !important; padding: 0px !important;'
  footer_mode: true
  header_css: >-
    padding-bottom: 30px !important; padding-left: 0px !important;
    padding-right: 0px !important;
  hide_config: true
  indicator_top: true
  menu_dropdown: true
  options_hide: true
  reverse_button_direction: true
  hide_help: true
  hide_unused: true
  menu_hide: true
  shadow: false
  voice_hide: true

Is it possible to put a clock in the header when in compact mode? Wasnā€™t able to figure it out for myself, wondering if itā€™s possible.

Hi,
I donā€™t think this has been discussed before, apologies if it has.
I previosly used Custom Header to jump to a specific tab depending on certain conditions within home assistant.

With the new 107 dashboard option, I would really like to be able to choose the dashboard that is displayed depending on these seem sensors (template).

Is this something that is being developed?
Is there another way of achieving it?

Thanks,
Bruce.

Wanted to start this one off with a disclaimer: Iā€™m very short on time ATM. Iā€™m an essential worker at both of my jobs during this pandemic (work at multiple hospitals in IT), the wife is essential as well (yet another hospital), trying to finish up my coding bootcamp, and my kidā€™s school is closed (makes any uninterrupted free time a rarity and I still need leisure time myself :slight_smile: ). I appreciate any patience you can give as I realize that many of you have much more free time than usual to work on your setups and it can be frustrating when something isnā€™t working like you want. Thank you for the detailed bug reports and your support during these strange and difficult times.

@doktordoc Try using either a separate user login for those devices with a user condition or an user agent condition, if neither works please submit an issue on the github

@ASNNetworks Looking into it.

@Turbo4door Look into making a buttonā€™s text into a clock instead of header text

@BruceH5200 Currently there are no features for the new dashboards, but theyā€™re in the works.

17 Likes

Hey man, I think we all thank you for this awesome addon.
Yes, it is important for many of us. BUT, it is far from being really essential.

So take care of your kids. Take care of your wife. Take care of yourself. And then take a rest of course :wink:

And if some spare time will remain for HA we will be happy to see you here. If not, the world will not stop, not now :slight_smile: Good luck.

7 Likes