Slider Card
custom:lcards-slider
A slider you drag to set a light, cover, fan, thermostat or volume, or a read-only gauge for a sensor. It comes in four looks: pill bars, ruler gauges, shaped fills and ring gauges.
- Most sliders need only
entityandpreset. The card works out from the entity what to control and over what range. - In a sections view each look asks for a cell that fits it (a pill bar 1 row, a ring 4, Picard 7);
grid_optionschanges it.
Try it
- The card editor's tabs cover the options on these pages, with a live preview.
- The Playground lets you edit slider YAML here in the docs and see the result.
| Page | Covers |
|---|---|
| Pills and Gauges | The pill bar and ruler gauge: track, ticks, labels, indicator, borders, text |
| Ring, Shaped and Picard | The ring gauge, shaped fills and the Picard gauge |
| Ranges and Markers | Coloured value bands and live markers on the track |
| Control and Motion | What it controls, min and max, value easing, the drag badge |
| Playground | Edit YAML and see the slider live |
Quick start
Two examples to start from: a light you drag, and a sensor shown as a gauge.
style.track.displaysets the scale a gauge shows. What a slider can set iscontrol.minandcontrol.max, which come from the entity unless you change them (Control and Motion).
yaml
type: custom:lcards-slider
entity: light.bedroom
preset: pills-left-borderyaml
type: custom:lcards-slider
entity: sensor.temperature
preset: gauge-basic
style:
track:
display:
min: -10
max: 40
unit: "°C"Presets
preset picks the look. Every preset is shown here against a sample light; drag one to set its brightness.
- A preset is a starting point: any
stylekey you set overrides it. - Without a preset, lights, covers, fans, climate and the other draggable domains draw pills, and everything else (sensors) draws a gauge.
preset: pills-basicYAML
type: custom:lcards-slider
entity: light.demo
preset: pills-basic
control:
attribute: brightness
preset: pills-left-borderYAML
type: custom:lcards-slider
entity: light.demo
preset: pills-left-border
control:
attribute: brightness
preset: gauge-basicYAML
type: custom:lcards-slider
entity: light.demo
preset: gauge-basic
control:
attribute: brightness
preset: gauge-left-borderYAML
type: custom:lcards-slider
entity: light.demo
preset: gauge-left-border
control:
attribute: brightness
preset: pills-left-border-roundedYAML
type: custom:lcards-slider
entity: light.demo
preset: pills-left-border-rounded
control:
attribute: brightness
preset: gauge-left-border-roundedYAML
type: custom:lcards-slider
entity: light.demo
preset: gauge-left-border-rounded
control:
attribute: brightness
preset: shaped-verticalYAML
type: custom:lcards-slider
entity: light.demo
preset: shaped-vertical
control:
attribute: brightness
grid_options:
rows: 5
preset: shaped-horizontalYAML
type: custom:lcards-slider
entity: light.demo
preset: shaped-horizontal
control:
attribute: brightness
preset: ringYAML
type: custom:lcards-slider
entity: light.demo
preset: ring
control:
attribute: brightness
grid_options:
rows: 4
preset: picard-ringYAML
type: custom:lcards-slider
entity: light.demo
preset: picard-ring
control:
attribute: brightness
grid_options:
rows: 4
preset: picard-gauge-verticalYAML
type: custom:lcards-slider
entity: light.demo
preset: picard-gauge-vertical
control:
attribute: brightness
component: picard
grid_options:
rows: 7
columns: 6
preset: picard-gauge-columnYAML
type: custom:lcards-slider
entity: light.demo
preset: picard-gauge-column
control:
attribute: brightness
grid_options:
rows: 7
columns: 3
Real cards with sample entities. Drag a slider to set the sample light's brightness.
| Preset | Look |
|---|---|
pills-basic | Segmented pill bar |
pills-left-border | Pill bar with an LCARS cap on the left |
pills-left-border-rounded | Pill bar with a left cap and a rounded right end |
gauge-basic | Ruler gauge: tick marks, labels and a fill bar |
gauge-left-border | Ruler gauge with a left cap |
gauge-left-border-rounded | Ruler gauge with a left cap and a rounded right end |
shaped-vertical | Upright lozenge fill with text above and below (shaped) |
shaped-horizontal | Flat lozenge fill with text left and right (shaped) |
ring | Three-quarter ring, name above a large value (ring) |
picard-ring | Near-full thick ring with flat ends (ring) |
picard-gauge-vertical | Picard-style upright gauge (Picard) |
picard-gauge-column | Picard Titan column gauge: number caps at both ends, a thin value bar, a range strip and a small oval thumb (Picard component, shape: column) |
Card options
The slider's own top-level keys. Each block has its own page; this table links to it.
- The slider also takes the keys every LCARdS card takes (
height,grid_options,id,tags,tap_action,animations,sounds,data_sources...): see Common card properties.
yaml
type: custom:lcards-slider
entity: light.bedroom
preset: gauge-left-border
control:
min: 10 # never dimmer than 10 %
drag_badge:
enabled: true| Key | Type | Default | Description |
|---|---|---|---|
entity | string | - | The entity to show and control. Its domain sets what the slider controls and its range: see Control and Motion |
preset | string | pills or gauge, by domain | The look: see Presets |
control | object | by domain | The range, the step, read-only, inverted: see Control options |
text | object | from the preset | Text on the card: the name, the value, your own labels. See Text labels |
style | object | from the preset | Overrides for the preset: the track and gauge, ranges, ring, shaped and Picard, borders |
component | string | from the preset | shaped, ring or picard without a preset that sets it |
value_tween | object | on | Eases the fill and markers to a new value when the entity changes: see Value tween. Off when the device asks for reduced motion |
drag_badge | object | off | A badge with the live value while you drag: see Drag value badge |
ranges_attribute | string | - | The attribute that range colours compare, for entities whose state is not a number |
state_attribute | string | - | The attribute whose value picks exact-match colours |