Compact Custom Header

Outside of edit mode and after a refresh? And the error?

Yes, Yes, Error below - just displays the custom card title in a new card.

Sun Dec 16 2018 12:12:39 GMT+1100 (AEDT)

https://domain.duckdns.org/local/custom-lovelace/compact-custom-header/compact-custom-header.lib.js?v0.0.9:89:18 TypeError: undefined is not an object (evaluating ‘cch_container.style’)

1 Like

Think I see the issue, seems to be with panel view. Working on a fix.

This is such a great idea and thanks for sharing.

1 Like

I don’t have panel view on. Also the card isn’t working at all other than showing the card. It’s in a vertical stack right now… might try putting it on it’s own?

yeah… moved out of the stack:
image
Still throwing an error and the card isn’t working…
image

Very odd, working great here. Looks like I got some work to do. Which will prove difficult if I can’t reproduce the issues.

Let me know if I can do anything to help trouble shoot. Just d/l 0.10.0 and it’s the same problem so I have removed the card for now. PITA I can’t just comment it out like in the yaml version. In a lot of ways, .storage/lovelace isn’t an upgrade. Hope those 2 branches for lovelace converge!

Another quick update to give it one more shot today. In some cases while in edit mode you’ll just see the edit bar, but nothing else. Happens if for some reason the card couldn’t be found or if it’s contained in another card like vertical-stack. It’s a workaround for now. Also fixed “header: false” not working properly.

also fixed the typo on the version number. new version is 0.1.1

Thanks for mentioning it @DavidFW1960

I wondered if that was a typo…

I’m seeing the same issue and getting this error (cleaned cache):

Uncaught TypeError: Cannot read property ‘shadowRoot’ of null
at compact-custom-header.lib.js?v0.1.1:31

hui_view = div_view.querySelector(‘hui-view’).shadowRoot;

Help me: ERROR (MainThread) Uncaught TypeError: Cannot read property ‘shadowRoot’ of null

I’m working on it, bear with me, free time is limited at the moment

@NeoID @PM-Smart

Update:

Apologize for the delay, updated to address the 0.84 issues. Please, let me know how it works out for you. No notes for the update really, just had to tweak a good bit to try and cover all bases: card in panel view, in container card like vertical-stack, yaml mode, normally placed, and edit view.

Well this is a new one:

https://my-domain.duckdns.org/local/custom-lovelace/compact-custom-header/compact-custom-header.js?v=0.1.2:44:28 Uncaught ReferenceError: yaml_mode is not defined

Yup, that’s my bad. Updated

OK that seems to be working now. Thanks.

1 Like

Thanks for the update!
On pages with panels I get this error now:

compact-custom-header.lib.js?v0.1.3:94 Uncaught TypeError: Cannot read property ‘0’ of undefined at VM45 compact-custom-header.lib.js:94

container_edit = (column[0].querySelector(‘hui-card-options’) != null);

1 Like

Just made another quick update to address that error. Thanks!