Home Assistant Community

Compact Custom Header

#429

@VDRainer Could you share your config for the card?

@gekim.84 What browser are you using?

#430

@ludeeus
yes the compact header works, i just get this pop-up every time i load/ refresh at the bottom left corner saying

Screenshot%202019-02-28%20at%2013-08-34

@mayker
I’m using Chrome (latest version)

#431
- type: custom:compact-custom-header
  menu: overflow
  background_image: true
  exceptions:
    - conditions:
        user_agent: Mobile
      config:
        options: hide
        hide_tabs: 13,14,15,16,17
    - conditions:
        user: TPad
      config:
        menu: hide
        options: hide
        hide_tabs: 0,1,2,3,4,5,6,7,8,9,10,11,12
#432

That pop-up is telling you that an error was written to the log. Click the info icon (far right) under developer tools in your sidebar to see what the error is. Or is it just the export error? Sorry if I’m telling you something you already know.

image

#433

Does removing background_image: true “fix” the issue?

#434

Unfortunately no,

#435

yes its just the export error, the compact header works tho.

here’s that full log error again (my url removed):

https://[myurl]/local/custom-lovelace/compact-custom-header-editor.js?v=1.0.1b2:35:1 Uncaught SyntaxError: Unexpected token export

Service system_log/write called.

#436

Okay, think I’ve been able to reproduce this. Check your browser dev-tools errors (F12), I imagine you’re getting something like TypeError: Cannot read property 'querySelector' of null around line 355.

This will require an update, but I’m on it.

#437

This is what i see, for whatever that means :blush:

#438

The menu button elements changed a bit in HA 0.89.0b0. This is fixed in the latest version 1.0.1b3.

1 Like
#439

hi, I’ve updated to your latest 1.0.1b3 and I still get the error:

#440

The latest update only addressed the HA 0.890b0 issues. Please, share your resources section and config for this card. Are you using YAML or storage mode? Have you restarted after adding javascript_version: latest? Have you cleared your cache?

#441

ahhh I see,

I’m on Synology Docker
HA 0.88.1
using yaml
I’ve homeassistant.restart everytime
I’m using latest chrome browser, clear cache as well

this is my resources:

- url: /local/custom-lovelace/compact-custom-header.js?v=1.0.1b3
    type: module
- url: /local/custom-lovelace/compact-custom-header-editor.js?v=1.0.1b3
    type: js
views:
#MY DASHBOARD
  - title: Main Dashboard
    icon: mdi:home
    panel: true
    cards:
    - type: custom:layout-card
      layout: vertical
      cards:
        - type: custom:compact-custom-header #Custom Compact Header
          main_config: true
          menu: show
          options: clock
          voice: hide
          notifications: hide
          clock_format: 12 
        - type: custom:layout-card
#442

Remove the editor portion from your resources completely. Editors do not need added there, just the cards. Remove these 2 lines:

- url: /local/custom-lovelace/compact-custom-header-editor.js?v=1.0.1b3
    type: js
#443

I see, thank you, beginner here and I didn’t know about that.
removed and fixed

#444

Love the clean look of this, but I’ve set notifications as overflow and the badge doesn’t display correct

#445

That might be an issue with your theme?

#446

I suspected this, but it looks like this even with the default theme

#447

Looks like I just need to adjust the styling of the indicator when it’s in there. Will fix soon.

#448

Great. Thanks!
Look forward to it!
Do you need a big reported in git hub?