github vogon1/bar-card v5.1.0

50 minutes ago

Sort your bars, keep fast-changing sensors calm, and find your way around the visual editor more easily. This release also fixes severity rules that silently did nothing when from was higher than to. Existing cards look exactly the same as before.

Sort your bars, or show only the top N

sort: desc puts the fullest bars first, sort: asc the emptiest. Add sort_limit to show only the first N, for example the five devices using the most power right now, or the batteries that need replacing first. The order updates as the values change.

Top 5 power consumers, sorted by usage
type: custom:bar-card
title: Top 5 power consumers
max: 2000
sort: desc
sort_limit: 5
min_update_interval: 30
entities:
  - sensor.washing_machine_power
  - sensor.dishwasher_power
  - sensor.desktop_power
  - sensor.tv_power
  - sensor.fridge_power
  - sensor.coffee_maker_power

Calmer cards for fast-changing sensors

min_update_interval sets the minimum number of seconds between two redraws. Sensors that report every second no longer make the card, or a sorted list, jump around constantly. Updates are delayed, not dropped: once the interval has passed, the card always shows the latest value. Changes to the card's configuration still apply immediately.

Every editor option explained

The visual editor now has a short explanation under each option, including its default value and unit, and each section says what it contains. The new options are under Appearance → Card.

The Card section of the visual editor with Sort, Sort Limit and Min Update Interval, each with a help text

Severity rules work in either direction

A rule with from higher than to, such as from: 100, to: 30, used to be silently ignored. It now applies to the same range as from: 30, to: 100, which is handy when you think top-down for a vertical bar.

Note

Styling Bar Card with card-mod? Current card-mod versions ignore a top-level style: option. Put your styles under card_mod: → style: instead. This is a card-mod change, not a Bar Card change; the README examples have been updated accordingly.

Upgrading

  • Marketplace / HACS: update Bar Card and refresh your browser.
  • Manual install: replace config/www/bar-card.js with the file below and change the resource URL to /local/bar-card.js?v=5.1.0, so your browser doesn't keep using the cached old version.

Coming from the original custom-cards/bar-card? Your cards keep working unchanged. See Coming from custom-cards/bar-card? in the README.


All changes in this release

  • New sort option (asc/desc) orders bars by fill percentage.
  • New sort_limit option shows only the first N bars after sorting.
  • New min_update_interval option sets the minimum time between two redraws.
  • Help text under every option in the visual editor, and clearer section descriptions.
  • Severity rules with from higher than to now apply to the same range as the reversed rule. (closes #1)
  • The editor's inherited-value hints, color picker tooltip and severity note are now in English instead of Dutch.
  • Rewritten README with ready-to-use examples, a labelled diagram of the parts of a bar, and a troubleshooting section.
  • README images are generated with npm run screenshots, in light and dark theme.

Full Changelog: v5.0.1...v5.1.0

Don't miss a new bar-card release

NewReleases is sending notifications on new releases.