Custom Header

It’s all in the docs.
https://maykar.github.io/custom-header/#intro/notes

1 Like

You most likely turned on kiosk mode. Follow the link from @VDRainer above to see how to temporarily restore the default header. Then you’ll be able to turn it off via Custom Header’s settings or by removing the option from “raw config editor”.

The editor warns you of any option that will remove your ability to edit the UI. While in the editor, be sure to read the warnings at the very top, look out for options with the warning icon, and read the important notes on the docs page.

Thank you very much!

Anyone else seen an issue where you can’t edit options on a mobile device? Selecting configure custom header just does nothing the first time then the second time it freezes up?

Also having an issue with getting a unique user agent… my iPad will say iPad in chrome but in safari/ios app it looks just like what it will be on my Mac…

Well, sort of. For me i have to click twice to actually see the view. For the menu options this is also the case. But is does not freeze for me. The second time clicking works. Running the 2.0 iOS app with iOS 13.3.1 (beta)

Made a little notifyer for HACS.
Knipsel
I have to wait till an update arrives, so i know if it works :stuck_out_tongue:
Also i don’t know if this sensor simply counts the amount of updates available and changes the state to that particular number? EDIT: maybe wrong thread, sorry for that.

Anyway, for those who are interested.

<ha-icon
      style='padding-bottom: 3px' icon='mdi:numeric-{% if 
      is_state('sensor.hacs', '0') -%}0-circle{% elif 
      is_state('sensor.hacs','1') -%}1-circle {% elif  is_state('sensor.hacs',
      '2') -%}2-circle {% elif is_state('sensor.hacs', '3') -%}3-circle {% elif 
      is_state('sensor.hacs','4') -%}4-circle {% elif  is_state('sensor.hacs',
      '5') -%}5-circle {%- else -%}{{states('sensor.hacs')}}{%- endif
      %}'></ha-icon>
1 Like

Is there a way to center the tabs in the header?

So safari on my Mac and on my iPad have the identical user agent so my mac isn’t showing the right tabs. Any ideas on how I can creatively fix this?

I have only one user. The problem is that on my iPad and iPhone, one of my tabs crashes and reloads all the time - I think just too many graphs and it doesn’t have enough memory. So I split that tab into 2 for mobile devices. So I can use my user_agent for windows to hide the split tabs and only show the original one and on my mobile I can hide the one tab and show the split ones but on my Mac I can only get the split ones showing which isn’t what I want… (Actually chrome is ok as I can define it down but safari is the issue)

Yeah, Apple changed the user agent for Safari on an iPad a bit ago. It no longer contains “iPad”. This thread has a bit more info and a “fix” of sorts, but I will be adding the “deviceID” feature from card-tools to CH to help with this sort of thing.

@DavidFW1960 & @heartkingz: The issue with unresponsive buttons has been brought up many times before and in the past it was found that this happens in the iOS app with or without Custom Header / CCH. I’m not sure if this is still the case, but on my iPad I don’t see this issue ( with or without CH ). If you can test to see if this happens without Custom Header it would be appreciated.

@aFFekopp No and with how the elements react to each other in the header this won’t be something I would add.

1 Like

I’m on the current version (1.2.1) and that issue I had a while back with the time showing the numerals and the AM/PM reversed has returned.

CH time

My config is

custom_header:
  compact_mode: true
  background: 'rgba(21,56,66, 0.2)'
  options_hide: false
  button_text:
    voice: '{{ date }} <br> {{ hours12 }}:{{ minutesLZ }} {{ AMPM }}'
  exceptions:
    - conditions:
        user_agent: Mobile
      config:
        compact_mode: true
        options_hide: true
        voice_hide: true
        chevrons: false

This one is confusing me as this should have been fixed in the latest release, but has been reported multiple times. Please, check your browser’s dev console (F12) and make sure the correct version of Custom Header (1.2.1) is reported.

Using your same config I get this on 1.2.1:

image

1 Like

JFWIW, a few cards, HACS keeps grabbing an old version for me (including this card yesterday) I don’t have any idea why it does it. Romrider/button-card has seen the same thing.

1 Like

Thanks for the reply. Yup, that’s the trouble. HACS says 1.2.1 but Chrome dev console says 1.2.0. Guess I’m seeing the same issue as @DavidFW1960.

Edited to add: I just tried hitting “reinstall” in HACS, and now I have the correct version 1.2.1, and the time is showing correctly.

1 Like

HI

could we set an exception for userAgent using 2 individual words? I need Chrome and Mac both to be true/present, since I need a tab for Casting, and Chrome is also available on the iPhone but won’t work from that device.

so my hope would be

   - conditions:
        user_agent: Chrome Mac

would be a valid config?

No. You can put a string in quotes and then it has to be a string in the user agent or else it just matches the first word… at least that’s what it did when I was testing on the weekend.

thanks, hope this can be added in that case, because we could really use that functionality. Would be a bit like the user exception, where we can write a comma separated list.

I might need to add:

conditions:
  user_agent: ! Chrome
config:
  hide_tab: 30

which would certainly be a feature request I fear, since it is not in the docs yet :wink:
would you consider that valid @mayker?

Sorry if this has been discussed but couldn’t find an answer with search.
The old CCH had a older maintained version to support amazon fire tablet (within kiosk browser running on chrome).
Does CH have a version or a way to make it work?

There should be no need for a legacy version anymore as Custom Header is using Babel to convert for older devices. Do you get any errors in your HA logs that might be helpful?

no errors, but had some odd behavior. Travelling right now and will send over. Appreciate the response (and knowing it should work i’ll double check my set up!)

I’m not sure I would add a “not” case as things that that should be the default config while everything else is an exception, but adding multiple user agents is something I would add.