For my example I have a sensor with air quality values (attributes), one of the attributes is the sum index for all measured values in string (low, medium, high, severe) and another sensor with with states like: low/medium/hight/severer.
Enhance existing severity option code to change displayed value to displayed text, this way an explanatory text can be displayed instead of value:
entity: sensor.example
title: Severity
type: 'custom:bar-card'
severity:
- color: Green
display: "Low"
from: 0
to: 25
- color: Orange
display: "High"
from: 26
to: 50
- color: Red
display: "Severe"
from: 51
to: 100
Please consider making the severity option for non-numeric values (and the %-range they apply up to, on the bar) like:
severity:
- color: green
display: "low" #if display is not used then use the sensors state/attribute text
from%: 0
- color: orange
display: "medium"
from%: 40
- color: red
display: "hight"
from%: 80
- color: purple
display: "severe"
from%: 90
Today (6/7) the standard Gauge Card got "label string" (optional), - Label of the segment. This will be shown instead of the value.
Hope the bar-card gets it to.
For my example I have a sensor with air quality values (attributes), one of the attributes is the sum index for all measured values in string (low, medium, high, severe) and another sensor with with states like: low/medium/hight/severer.
Please consider making the severity option for non-numeric values (and the %-range they apply up to, on the bar) like:
Today (6/7) the standard Gauge Card got "label string" (optional), - Label of the segment. This will be shown instead of the value. Hope the bar-card gets it to.