Lovelace: Bar Card

Sorry for the late reply, but it does work like a charm! Great work, and thank you very much for this!

1 Like

Hi can someone tell me what i can do for this error " No visual editor available for: custom:bar-card"

Tap the link to edit in yaml modeā€¦ a lot of custom cards donā€™t use the GUI to editā€¦

Hi guys,

Anyone can help me with add header text with card button-card?

I have successfully used bard-card + auto-entities, but not succesfful used bard-card + auto-entities + button-card.

Anyone can share an exemple?

Thank you for help.

I use vertical-stack-in-card to add a header using button-card.


I use decluttering-card to make a template for my headers, so itā€™s a bit tricky to share the code. But itā€™s basically a button-card at the top and then whatever cards you want inside a vertical-stack-in-card.

Since the latest update to 1.7.1 my bars donā€™t show up anymore. In the browser console log i get:

Uncaught (in promise) TypeError: Cannot set property 'textContent' of null

They reappear correctly and without the error message when i go down to 1.7.0. Hereā€™s the code:

          - type: 'custom:bar-card'
            title: 'Elevation'
            title_position: off
            entity: sensor.strava_elevation
            height: 30
            min: 0
            max: 3300
            target: 3000
            card_style:
              background: none
              box-shadow: none

I tried comparing the latest commit with 1.7.0 but my js knowledge is not advanced enough to tell if

  • Fixed card config injecting entries into the lovelace config.

can possibly have something to do with it.

Not sure if this is because of the update, it could very well be though. However I see you have the title defined and title_position set to off. Try removing the title definition.

Also Iā€™m working on version 2.0.0 so Iā€™ll see if I can fix this for the update.

1 Like

Yay, thanks. The culprit seems to be the title_position, though. As soon as i uncomment it it works, if there is a title set or not.

just checking instructions say

" Copy bar-card.js to <config directory>/www/custom-lovelace/bar-card/bar-card.js .

but I cannot see a bar-card.js file, only ts now?

You can download the js file from the release page or use HACS (which I highly recommend). And yes Iā€™m converting this card to ts.

Perfect thank you, Had missed the release file!

All working now.

I need to set up HACS at some point but do most of my tinkering while at work using DuckDNS so copying all the Hacs files to set it up isnt possible.

Is this broken for anyone else since updating to HA Core 0.106?

My cards were working fine before but now they all look like this:

Possibly something to do with the changes to custom cards?

Are you running the latest version? Because this should be fixed in 1.7.1.

Yes, the Bar-Card is also broken for me - when I updated to 0.106 I have installed the latest version of Bar-Card from GitHub, my guess its broken because of the changes.

I am seeing the same error.
bar-card 1
Home assistant core: 0.106.0
Bar card: 1.7.1

Add: height: xxxpx at bottom.
Check option on https://github.com/custom-cards/bar-card

I added height and now getting the below error.

          - type: custom:bar-card
            entity: sensor.glances_disk_used_percent
            title: OS Drive
            title_position: inside
            align: split
            show_icon: true
            height: 200px

I am now getting the message:
ā€œCannot add property direction, object is not extensibleā€

Now add: direction: up
Add options until error will gone.
Itā€™s happened because of:
Custom cards

@sjdvda @MediaCowboy @Vlad Iā€™m unable to reproduce this error on 1.7.1, because this is what the update is meant to fix.

First make sure you are actually running 1.7.1 by checking the Chrome console window.

If youā€™re still getting the error please paste your full card config here and Iā€™ll see if itā€™s related to a specific use case.

@Gluwc,

Okay. I donā€™t know what changed but I deleted everything need to try to make the card work. Cleared the cache on my browser, logged back in, and itā€™s all working.