hd-gauge
A 270° dial filled up to a value within a range (target temperature, battery, power); what you put inside it (the value in words) sits a little below the dial’s centre (move it with middle-y), or stands on the base line of a half circle. Part: ::part(middle).
| Attribute | What it is |
|---|---|
value | What it fills up to, e.g. {{ cap.target_temperature }} (its range then comes from the capability) or a number. 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 dot on the dial, e.g. the current temperature. 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. |
sweep | How far round the dial goes: the classic 270°, a wider 240°, or a half circle (180), which is half as tall.One of 270, 240, 180. Default 270. |
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. |
middle-y | How far below the dial’s centre what is inside it sits, in % of the radius: 0 is the exact middle, 25 (the default) a little lower toward the opening, negative higher; at most 60 either way. Not on a half circle. |
<hd-gauge value="{{ cap.target_temperature }}" marker="{{ cap.measure_temperature }}" zones="22:warn,26:danger"> <b>{{ cap.target_temperature.value | temp: 1 }}</b></hd-gauge>