Compact Custom Header

If you check your text logs, they are all there. Also, have you tried card-loader? It’s a custom card that forces cards to load in a specific order. It recently got rid of a few of my errors.

EDIT: You have, I didn’t read your full post. Please ignore me.

Searching your issue and this popped up:

Do you experience the same thing as the people in the comments here?

I don’t think that this is coming from CCH (could be wrong). I will look into it though.

Keep CCH commented out in your resources section for a while and be sure to interact with HA a good bit, click around to history, hassio tab, etc. and see if the error pops up again. If it does, then we can rule CCH out.

1 Like

Hi @mayker,

Is it possible to use Compact Custom Header for setting a different Lovelace UI view for Mobile and Tablet respectively?

Because the width of tablet is wider, causing all my card components to spread across wide width.

Thanks.

Yes, make an exception config for the tablet and mobile. If they are always the same tablet and mobile device use user_agent, if not use media_query. Then hide views/tabs to show certain views to one and not the other.

I did just delete all my views and just added a standard entity card, set it to the default theme, restarted and it keeps appearing. So it doesn’t seem to be any custom cards’ fault!

1 Like

Just pushed a small update to conditional templates to avoid confusion between this and other template implementations as well as help those that are used to Jinja templates.

  • Can now use return in templates if you prefer.
  • Can use either entity or states in templates.

I adjusted wiki examples to use states, but there’s no difference between the two examples below.
Use whichever you prefer (not a breaking change).

states["input_boolean.living_room"].state
entity["input_boolean.living_room"].state

1 Like

Anyone else having problem with hide_tabs on the last 2-3 versions? It doesn’t seem to work anymore for me.

What does your config look like? Any errors in HA logs or your browsers Dev-Tools (F12)?

Here’s the config

 - type: custom:compact-custom-header
   main_config: true
   voice: hide
   hide_tabs: 9
   redirect: false
   swipe: true
   swipe_animate: fade

No errors in dev-tools console

Looks like a bug with config for hiding/showing a single tab. Will fix it up soon, for now just add quotes to hide_tabs:

 - type: custom:compact-custom-header
   main_config: true
   voice: hide
   hide_tabs: '9'
   redirect: false
   swipe: true
   swipe_animate: fade

Edit: fixed in latest release.

It works with the quotes :slight_smile:

1 Like

I think this might be broken again. I just tried to hide header, and now have a white line as high as the regular header at the bottom.

1 Like

Thank you! Should be fixed in the latest release which includes:

  • Prevent swipe animation on first/last tab if wrap is disabled and swiping to nothing.
  • Fix view height when header is hidden.
2 Likes

So now that we have swipe capabilities via CCH, I noticed an interesting behavior which is both unsurprising and somewhat problematic. In my implementation, the swipe feature engages when interacting with cards that have a horizontal slider. I’m not sure what, if anything, can be done to curtail this behavior. Thoughts?

I can probably do something about that. What cards are you using that scroll horizontally and are you using prevent_default?

I personally use Thomas Loven’s slider-entity-row. I am not using prevent_default in my config as of yet.

1 Like

I misunderstood, I thought you were talking about a horizontally scrolling card.

I can’t believe I missed this. Will be fixed shortly. Thank you!

This has been fixed in the latest release

just so I get it right, should the swipe feature cause movement in the views, when only moving from left to right (and vv) in the menu? Without selecting a new tab that is. Its not that it selects another view, but it seems to reload it from the side the swipe went…
I find it very difficult to swipe through the menu, but it might be an app issue?

Using the iOS beta 2 app.