You are reading the development docs (2026.12.1-dev.1): features here may not be released yet.
Skip to content

Ranges and Markers ​

style.ranges is a list of coloured bands and live markers drawn on the track. Use a band to show a comfort zone or a danger zone, and a marker to show a second value, such as the room temperature next to the thermostat setting. An item with min and max is a band; an item with value is a marker.

yaml
type: custom:lcards-slider
entity: climate.living_room
preset: gauge-basic
control:
  min: 10
  max: 30
style:
  gauge:
    progress_bar:
      height: 8 # a thin fill, so the bands show
      align: end
  ranges:
    # three bands: cold, comfortable, hot
    - min: 10
      max: 17
      color: var(--lcards-blue)
      opacity: 0.5
    - min: 17
      max: 24
      color: theme:colors.status.success
      opacity: 0.5
    - min: 24
      max: 30
      color: theme:colors.status.error
      opacity: 0.5
    # a marker at the room temperature, with a caption
    - value: "{entity.attributes.current_temperature}"
      color: var(--lcars-orange)
      label:
        text: NOW

Range band fields ​

A band colours the stretch of the track between min and max. On a gauge it is a coloured block behind the scale; on pills it recolours the pills inside it; on a ring it colours that part of the ring, and on a shaped slider that part of the shape.

  • Bands sit under the fill, so a full-height fill hides them. Use a thin fill (style.gauge.progress_bar.height) or a low opacity to keep them visible.
  • min and max can follow other entities, so a band can show a range that changes, such as a target set elsewhere.
yaml
type: custom:lcards-slider
entity: sensor.temperature
preset: gauge-basic
style:
  track:
    display:
      min: -10
      max: 40
      unit: "°C"
  gauge:
    progress_bar:
      height: 8
      align: end
  ranges:
    - min: -10
      max: 0
      color: var(--lcards-blue)
    - min: 30
      max: 40
      color: theme:colors.status.error
      opacity: 0.6
More about bands
  • Templates: min and max take only the quick template kinds: tokens such as {entity.state}, {entity.attributes.x}, {states.domain.object_id.state}, {datasource:name}, {config.x}, {variables.x}, and [[[JavaScript]]]. Jinja2 is not supported there, because positions are worked out again on every state change.
  • Scale: min and max are measured on the scale the track shows (style.track.display), not on the range the slider sets.
KeyTypeDefaultDescription
minnumber / stringrequiredWhere the band starts: a number or a quick template
maxnumber / stringrequiredWhere the band ends, as min
colorcolour / object-Band colour; a state map works
opacitynumber0.3 on a gauge, 1 on a ring or shaped sliderBand opacity, 0 to 1. On pills it sets the pills' opacity inside the band; without it they keep their usual opacity

Value marker fields ​

A marker points at one value on the track and moves when that value changes. On a gauge it is a triangle at the value; on pills the pill at the value is filled and outlined; on a ring it sits on the band. A shaped slider draws bands only, no markers.

  • A marker's color colours it on every look: the marked pill, or the gauge or ring marker. indicator.color wins over it when both are set.
  • Defaults for every marker on the card go in style.gauge.marker_indicator; a marker's own indicator keys win.
yaml
type: custom:lcards-slider
entity: light.bedroom
preset: pills-left-border
style:
  ranges:
    # pills: the pill at 75 is filled with this colour and outlined
    - value: 75
      color: var(--lcars-orange)
      pill_style:
        stroke_color: var(--lcars-yellow)
        stroke_width: 3
yaml
type: custom:lcards-slider
entity: sensor.temperature
preset: gauge-basic
style:
  track:
    display:
      min: -10
      max: 40
      unit: "°C"
  ranges:
    # gauge: a round marker at 20 and a line marker at 30
    - value: 20
      color: var(--lcars-yellow)
      indicator:
        type: round
        size:
          width: 12
    - value: 30
      color: theme:colors.status.error
      indicator:
        type: line
        size:
          width: 3
          height: 24
More about markers
  • Templates: value takes the same quick template kinds as a band's min, so a marker can follow another entity's state or attribute.
  • On a ring: markers size themselves by type (round uses width only), rotation is not used, and offset takes y only, which moves the marker outward.
KeyTypeDefaultDescription
valuenumber / stringrequiredWhere the marker sits: a number or a quick template, as a band's min
colorcolour / objectpills: var(--lcars-text-light), gauge and ring: marker_indicator.color, else the themeThe marker's colour; a state map works
indicator.typestringtriangle (line on a ring)line, round or triangle
indicator.alignstringstartWhere across the track: start, center or end. On a ring: start for line, end for triangle, center for round
indicator.colorcolour / objectthe marker's colorWins over color
indicator.size.widthnumber20Width, px
indicator.size.heightnumber20Height, px
indicator.rotationnumber180Turn, degrees (not on a ring)
indicator.offset.xnumber0 (20 on picard-gauge-vertical)Nudge right, px
indicator.offset.ynumber10 on a flat gauge (20 with the left-border gauge presets), else 0Nudge down, px (on a ring: outward)
indicator.border.enabledbooleanfalseOutline the marker
indicator.border.colorcolour / objectthemeOutline colour
indicator.border.widthnumber1Outline width, px
pill_style.strokebooleantruePills: outline the marked pill
pill_style.stroke_widthnumber2Pills: outline width, px
pill_style.stroke_colorcolour / objectthe marker's colorPills: outline colour

Label fields ​

A label is a caption on a marker, such as NOW or TARGET, or the value itself. It sits beside the marker on a gauge, beside the marked pill on pills, and outside the scale on a ring. Nothing shows unless label.text is set.

  • On a flat track the caption sits above the marker, or below it when the card has no room above (a flat gauge's marker is at the top of the track). On an upright track it sits beside the marker.
  • Captions don't move out of the way of tick labels, the value text or each other: use offset to place one exactly.
yaml
type: custom:lcards-slider
entity: sensor.temperature
preset: gauge-basic
style:
  track:
    display:
      min: -10
      max: 40
      unit: "°C"
  ranges:
    - value: 25
      color: var(--lcars-orange)
      label:
        text: TARGET 25
        color: var(--lcars-orange)
        font_size: 16
        offset:
          x: 50 # right of the marker
          "y": 16 # level with the marker
More about labels
  • Templates: label.text takes every template kind, Jinja2 and data sources included, unlike a marker's value.
  • Offsets replace the default spot: setting offset.y on a flat track (or offset.x on an upright one) replaces the default distance from the marker, so the number you give is measured from the marker itself.
KeyTypeDefaultDescription
label.textstring-The caption: any template, Jinja2 and data sources included
label.colorcolour / objectthemeCaption colour; a state map works
label.font_sizenumber14 (12 on a ring)Size, px
label.offset.xnumberbeside the markerNudge sideways, px
label.offset.ynumberabove the marker (below when there is no room)Nudge down, px

Released under the MIT License. | About