Slider control¶
A slider lets the user choose a numeric value by dragging a thumb along a visible range. Use it when position within the range is more useful than repeatedly pressing minus and plus, such as for brightness, volume, temperature, scale limits, or history duration.
Connect a single slider to a Home Assistant Number, Input number, or an Flexible Horseshoe Card input number. A range slider connects two numeric entities and lets the user choose both a lower and an upper value.
Basic configuration¶
This example creates a linear brightness slider:
The slider uses the minimum, maximum, step, value, and unit from the connected entity.
Entity and input settings
entity_index: 0 connects the slider to the first entry in entities. The initial, min, max, step, unit, and scope settings configure the Flexible Horseshoe Card input, not the Slider control. See Flexible Horseshoe Card input number for all input settings and Entities for entity indexes and optional slots.
Configuration options¶
| Option | Description |
|---|---|
type: slider | Adds a slider control. |
entity_index | Numeric entity used by a single-value slider. |
values | Two numeric entities used as the lower and upper values of a range slider. |
xpos, ypos | Position of the slider in the card. |
width, height | Size of the slider track and interaction area. |
show.item_variant | Selects a single value or a range with two values. |
show.item_viz | Displays a linear or circular slider. |
value | Shows and positions the current value beside the slider. |
interaction.update_interval | Controls how often a value is sent while the user drags. |
label | Optional text positioned beside or above the slider. |
visibility | Shows, hides, or disables the slider. |
The value range and step belong to the connected entity or Flexible Horseshoe Card input.
Select a lower and upper value¶
A range slider connects exactly two numeric entities:
The lower value cannot move above the upper value, and the upper value cannot move below the lower value.
Use a circular slider¶
A circular slider is useful when it fits the visual language of a gauge or horseshoe card. Give it equal width and height:
Show the current value¶
Use value.position to place the value at start, end, top, bottom, or center:
For a range slider, range_spacing controls the distance between the two displayed values.
Control updates while dragging¶
The slider sends updates while the user drags. Increase interaction.update_interval when the target should receive fewer updates:
The value is always sent when the drag ends.