Lovelace: Bar Card

Ahh…that will cut back and simplify it a bit. Guess I really need to not be so picky with the severities and make my life much easier :stuck_out_tongue_winking_eye: thanks!!!

Is there a way to the following:
I have switches to activate my sprinkler system of a zone for a certain time.
Is there a way to show the progress of this automation, from the moment it was triggered till the end of the period?

My switches:
- platform: rainbird
switches:
sprinkler_1:
zone: 1
friendly_name: “Front Side”
trigger_time: 45
scan_interval: 10
sprinkler_2:
friendly_name: “Front Main”
zone: 2
trigger_time: 45
scan_interval: 10
sprinkler_3:
friendly_name: “Front Guest Room”
zone: 3
trigger_time: 25
scan_interval: 10
sprinkler_4:
friendly_name: “Cedar Trees”
zone: 4
trigger_time: 60
scan_interval: 10

I think your best bet would be to make some sort of template sensor or automation that outputs the remaining time and use that in a bar card.
However this seems unrelated to this card.

How can I refresh this card using a timer or a counter? Is there a way to have the card display a timer?

The card itself can not show a timer. The best way to get a timer is to make some sort of template sensor that updates it’s value like a timer.

EDIT : I think my formatting is wrong
Hello, I’ve just found this and it is great but I am having loads of issues. I’m on the latest 1.3 and have

resources:
  - type: js
    url: /local/custom-lovelace/bar-card/bar-card.js?v=1.3.0

when I do something simple it works fine, but if I try to use both horizontal and vertical cards, it gives the card not found error. I am using manual card in love lace editor

- cards:
    - cards:
    - type: 'custom:bar-card'
      title: Temperature
      entities:
        - sensor.rennas_cpu_temperature
      max: 100
      title_position: inside
      align: left
    - type: 'custom:bar-card'
      entities:
        - sensor.rennas_cpu_usage
      max: 100
      title_position: inside
      align: center
    - type: horizontal-stack
- type: 'custom:bar-card'
  entities:
    - sensor.rennas_memory_available
  max: 100
  title_position: inside
  align: center
- type: vertical-stack

Any ideas please?

Does someone use the bar card with Wallpanel app?
Only with this the bars are empty.

same issue, inside wall panel app the bars are empty (They show the value, text and icon, but not the colored bar)

I guess it depends on the app, because of the used browser in the Wallpanel not exactly chrome. But in the Fullykiosk the barcard appears totally.

How can i add title above my entities?

like in pic 2

                  - type: custom:bar-card
                    title: MB Received
                    title_position: inside
                    entity: sensor.bytes_received
                    max: 10000
                  - type: custom:bar-card
                    title: MB Sent
                    max: 5000
                    title_position: inside
                    entity: sensor.bytes_sent

if i’m not using max option it wont display the full number just maxed of 100MB,

any one know what do ?

with max option enabled:

without max:

The max value clamps to the max value set so you don’t see the decimals, otherwise it should just show the state value from your entity. I suspect you entity value actually has the decimals in it.

anything to do about it ?

i have the same behavior with pi-hole display ads number, if not enabling the max option it will display 100 ads.

config :

                  - type: custom:bar-card
                    title: Ads Blocked Today
                    title_position: inside
                    entity: sensor.pi_hole_ads_blocked_today
                    max: 10000
                  - type: custom:bar-card
                    title: DNS Queries
                    title_position: inside
                    entity: sensor.pi_hole_dns_queries_today
                    max: 100000

The header is not part of the barcard. It’s a button-card used as a header.

1 Like

This looks like a bug if it’s adding decimals that are not in your entity state, I’ll have a look and see if I can reproduce it.

1 Like

any update?

Sorry for the late response. I haven’t been able to track down the bug, however I did add an option in 1.5.0 to limit the amount of decimals displayed on the card. Hope this is sufficient to fix the issue you are having.

1 Like

Thank you for trying to help, still same issue currently running 1.5.0 version.
do i need to add something to the config ?

lovelace:

                  - type: custom:bar-card
                    title: Ads Blocked Today
                    title_position: inside
                    entity: sensor.pi_hole_ads_blocked_today
                    # max: 10000
                  - type: custom:bar-card
                    title: DNS Queries
                    title_position: inside
                    entity: sensor.pi_hole_dns_queries_today
                    # max: 100000
                  - type: custom:bar-card
                    title: Pi-Hole DNS Unique Clients
                    title_position: inside
                    entity: sensor.pi_hole_dns_unique_clients
                    # max: 25

Oh yes sorry, by default nothing changes. You’ll have to add it to the config.

- type: custom:bar-card
  title: Ads Blocked Today
  title_position: inside
  entity: sensor.pi_hole_ads_blocked_today
  decimal: 0

same issue:

lovelace:

                  - type: custom:bar-card
                    title: Ads Blocked Today
                    title_position: inside
                    entity: sensor.pi_hole_ads_blocked_today
                    decimal: 0
                    # max: 10000
                  - type: custom:bar-card
                    title: DNS Queries
                    title_position: inside
                    entity: sensor.pi_hole_dns_queries_today
                    decimal: 0