hd-meter
A straight bar filled up to a value within a range: progress, a level, how full a tank or bin is. Sideways, or filling from the bottom up with orientation="vertical". It draws only the bar; write the value next to it. Its thickness is the CSS variable --hd-meter-size (10px sideways; the full width upright), its rounding --hd-meter-round. Parts: ::part(bar), ::part(fill).
| Attribute | What it is |
|---|---|
value | What it fills up to, e.g. {{ settings.tank.value }} or a number; a live capability brings its own range. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}. |
min | Minimum; defaults to the capability’s, else 0. |
max | Maximum; defaults to the capability’s, else 100. |
marker | A second value shown as a line across the bar, e.g. a target. Or a live capability of any device, followed: {{ settings.x.cap.measure_power }}. |
color | A theme colour name (accent, lit, cool, good, warn, danger, text, surface, canvas, chart-1…chart-6) or #rrggbb: whatever a Colour setting gives.One of accent, lit, cool, good, warn, danger, chart-1, chart-2, chart-3, chart-4, chart-5, chart-6. |
zones | Stretches of the range in a colour (a theme colour name or #rrggbb), each from a value up to the next: 60:warn,80:danger. They tint the track (the empty part); how they colour the fill is zone-fill. |
zone-fill | How the zones colour the fill: value (all of it in the colour of the zone the value is in), sections (each part in its zone’s colour, its own colour below the first zone) or track (always its own colour; the zones only tint the track).One of value, sections, track. Default value. |
orientation | Sideways, or upright filling from the bottom (a tank).One of horizontal, vertical. Default horizontal. |
<hd-meter value="{{ cap.measure_humidity }}" max="100" zones="60:warn,75:danger"></hd-meter>