Skip to content

Major rendering, responsiveness, and demo/docs upgrade

Choose a tag to compare

@cdelaet cdelaet released this 16 May 19:28

Highlights

New severity_gradient color mode

A new severity_gradient mode has been added.

  • severity now behaves as true fixed color bands
  • severity_gradient uses the same severity ranges as color anchors, but interpolates smoothly between them
  • the interpolation model is more intuitive:
    • first band color is exact at the first band start
    • last band color is exact at the last band end
    • intermediate colors are exact at their band midpoints

Stable animated color scales

Bar color geometry was reworked so animation no longer distorts the scale.

This fixes issues where:

  • severity bands visually stretched during width animation
  • the above_target_color split wobbled around the target while animating

The bar now uses a static color scale with an animated reveal mask, so colors stay pinned correctly.

Major responsive layout fixes

A large amount of responsive behavior was reworked across all label positions.

Fixed and improved:

  • left-label truncation and width negotiation
  • above-label truncation and value protection
  • inside-label collision handling
  • stable card containment in narrow layouts
  • stable bar alignment in stacked multi-row cards
  • more predictable extreme-width fallback behavior
  • value/unit fitting and truncation priority
  • better behavior for negative values, long labels, and text states

Redesigned markers

Reference markers were redesigned.

Changes:

  • old line/chevron marker system replaced with compact edge markers
  • marker contrast is much clearer on similar bar colors
  • peak and target markers coexist cleanly without fighting visually
  • target marker, target label, and above-target split now animate in sync

Dynamic entity improvements

Dynamic scale/target features were expanded and stabilized.

Includes:

  • dynamic min_entity
  • dynamic max_entity
  • dynamic target_entity
  • target value labels
  • above-target color highlighting

Demo / playground improvements

A full demo playground and screenshot board were added and expanded.

Added:

  • live playground dashboard
  • screenshot-focused dashboard
  • helper/package setup for reproducible scenarios
  • long-label tests
  • text-state tests
  • negative/min/max edge cases
  • responsive narrow-width tests
  • marker stress tests
  • wave-driven animation controls
  • selectable wave target for animating either current value or target value

Documentation refresh

The README was fully rebuilt and modernized.

Includes:

  • clearer install instructions
  • updated screenshots and animated GIFs
  • examples that match current behavior
  • dedicated docs for:
    • severity
    • severity_gradient
    • dynamic entities
    • target/peak markers
    • label positions
    • formatting and text states
    • per-entity overrides
    • responsive behavior notes

Notable fixes since v1.1.1

  • fixed severity mode semantics
  • fixed animated color band distortion
  • fixed target split animation mismatch
  • fixed marker readability and overlap presentation
  • fixed left/above/inside responsive layout failures
  • fixed unit/value truncation priority issues
  • fixed negative-value fitting issues
  • fixed target-label containment and alignment issues
  • fixed text-state rendering inconsistencies
  • fixed many narrow-card layout failures exposed by the new playground

Upgrade note

If you already use the original project, this fork is still a separate card:

  • resource: /local/sensor-bar-card-plus.js
  • type: custom:sensor-bar-card-plus

It is not a drop-in replacement for custom:sensor-bar-card.