Custom Header

Hi, I’m checking this thread and now being a little confused on how to move to custom header. Currently I’m on CCH 1.4.9. and have 4 different users configured (Display user in Kiosk-Mode and reduced numer of tabs, Kids with only two tabs available etc)
What are the steps now in order to keep my settings:
Simply install custom header, restart, remove CCH, restart or is there another smart way?

You just add a background in your themes yaml and create an image with the background color of your theme in the www folder.

lovelace-background: center / cover no-repeat url("/local/background.png") fixed

no need to restart. remove CCH, install CH and find the settings you need :wink:

ok thanks, will have a look.

Don’t understand how this could solve to for now though, because on the pages I do have a background on, this issue also is showing. Changing that background to a color wouldn’t make the overflow go away?

wait, you’re right, it does. And I was incorrect! the pages with background do show correctly:
24

The way that exceptions work haven’t changed, but many of the config options have. If you share your CCH config I can give you an idea of what you’d need to change.

Thank you, that solution gives me an idea of where the bug is.

Hi,

thanks for your help.
This is my config:

cch:
  chevrons: true
  clock_format: '24'
  default_tab: '0'
  exceptions:
    - conditions:
        user: Display
      config:
        chevrons: false
        clock_format: '24'
        default_tab: '7'
        header: true
        hide_tabs: '1,6,8,9,10'
        kiosk_mode: true
        menu: show
        notifications: show
        options: clock
        sidebar_closed: false
        sidebar_swipe: true
        swipe: true
        swipe_amount: '15'
        swipe_animate: none
        voice: show
    - conditions:
        user: Remote
      config:
        clock_format: '24'
        default_tab: '5'
        hide_tabs: '2,3,6,7,8,9'
        kiosk_mode: true
        menu: show
        notifications: show
        options: clock
        voice: show
    - conditions:
        user: Yvonne
      config:
        clock_format: '24'
        default_tab: '10'
        hide_tabs: '5,6,7,8,9'
        kiosk_mode: false
        menu: show
        notifications: show
        options: clock
        voice: clock
    - conditions:
        user: Mobile
      config:
        clock_format: '24'
        date_locale: de
        default_tab: '10'
        hide_tabs: '6,7,8,9'
        kiosk_mode: true
        menu: show
        notifications: show
        options: clock
        show_tabs: []
        voice: show
  hide_help: true
  options: clock
  swipe: true

This should do it. Be sure to check out the docs if you have any questions.

custom_header:
  hide_help: true
  button_text:
    options: '{{ time }}'
  locale: de
  exceptions:
    - conditions:
        user: Display
      config:
        chevrons: false
        default_tab: '7'
        hide_tabs: '1,6,8,9,10'
        kiosk_mode: true
    - conditions:
        user: Remote
      config:
        default_tab: '5'
        hide_tabs: '2,3,6,7,8,9'
        kiosk_mode: true
    - conditions:
        user: Yvonne
      config:
        default_tab: '10'
        hide_tabs: '5,6,7,8,9'
        button_text:
          voice: '{{ time }}'
    - conditions:
        user: Mobile
      config:
        default_tab: '10'
        hide_tabs: '6,7,8,9'
        kiosk_mode: true
1 Like

Thank’s a lot!! - PS: Works.

1 Like

How do I display hour when the clock hits midnight?

EDIT : Looks like I need to use ‘hours24’ variable, correct?

image

    options: >-
      {{ hours12 }}:{{ minutesLZ }} {{ AMPM }} -  <ha-icon icon='mdi:weather-{%
      if is_state("weather.dark_sky", "partlycloudy") -%}partly-cloudy{%- else
      -%}{{ states('weather.dark_sky')}}{%- endif %}'></ha-icon>
      {{states.weather.dark_sky.attributes.temperature }}°

Nah sorry, looks like my hours12 and hours12LZ variables are wrong. I’ll have em fixed in the next release.

You could just use replace {{ hours12 }}:{{ minutesLZ }} {{ AMPM }} with {{ time }} for now.

No problem. I thought I was using wrong variable.

Also following tab_icons snippet didn’t work for both tabs. There were no errors in the developer tools console. I verified that, this works via HA Templates editor. Anything wrong here?

  tab_icons:
    '1': '{%- if states.sensor.house_mode.state | lower == "day" %} mdi:alarm {% endif %}'
    '0': >-
      '{% if is_state('device_tracker.life360_phone1', 'home') and is_state('device_tracker.life360_phone2', 'home') -%}'
        mdi:account-group-outline
      '{%- elif is_state('device_tracker.life360_phone1', 'not_home') and is_state('device_tracker.life360_phone2', 'home') -%}'
          mdi:account-star
      '{%- elif is_state('device_tracker.life360_phone1', 'home') and is_state('device_tracker.life360_phone2', 'not_home') -%}'
          mdi:account-tie
      '{%- else -%}' mdi:alarm
      '{%- endif %}'

Try this, watch out for extra spaces and quotes. I’m at work so I can’t really test this, but give it a shot.

  tab_icons:
    '1': '{%- if states.sensor.house_mode.state | lower == "day" %}mdi:alarm{% endif %}'
    '0': >-
      {% if is_state('device_tracker.life360_phone1', 'home') and is_state('device_tracker.life360_phone2', 'home') %}
      mdi:account-group-outline
      {% elif is_state('device_tracker.life360_phone1', 'not_home') and is_state('device_tracker.life360_phone2', 'home') %}
      mdi:account-star
      {% elif is_state('device_tracker.life360_phone1', 'home') and is_state('device_tracker.life360_phone2', 'not_home') %}
      mdi:account-tie
      {% else %}
      mdi:alarm
      {% endif %}

there is an issue on my iPad mini 2 with iOS 12.4.3
custom header is overlapping the view and the first tab is not visible

my config:

custom_header:
  compact_mode: true
  hide_config: true
  chevrons: false

I just installed HACS to use Custom Header, so this might be a really stupid question. I previously used CCH, but I actually changed hosts a while ago and had not re-implemented CCH, so it should be a clean install.

When I first went to install Custom Header, I recall seeing two items called Custom Header in the Plugins tab of HACS and thinking that was strange. I picked one and installed it, everything seems to be fine, I’ve setup some custom tabs, etc. Now I see that you’ve performed some updates, so I wanted to look into doing an upgrade. How do I do that? When I look under the Community tab, I don’t see Custom Header as an installed item (only HACS shows there).

When I click on the Custom Header item that I see under Plugins, it says 1.0.7 and Install. It doesn’t say Upgrade, or Update. I also don’t see how I can tell what version I’m on.

Do I just install 1.0.7 over whatever I have? Or is something very strange in my setup? Thanks!

yes, and yes

Hm that is strange, what works for me is:

custom_header:
  view_css: 'padding-top: 95px !important;'

You might need to play with the padding size. Not the ideal setup as I think this shouldn’t be necessary when using it with defaults however this might solve your problem (albeit maybe only temporary).

Thanks! I just did that (was given a prompt that it would overwrite the existing .js file). Oddly enough, now it shows as an installed plugin under the Community tab.

Please submit an issue with as much of the requested info as possible. Thank you.

This one worked. Then what’s the use of {%- ?? Isn’t that supposed to remove the white spaces before the string?

Following snippet didn’t work.