# oh-slider - Slider
Slider control, allows to pick a number value on a scale
By default, the slider control will use the display state of the Item, if available.
If the display state is not available, it will use the raw state of the Item.
If you want to always use the raw state, set the ignoreDisplayState
property to true
.
[!NOTE] If you have problems with the slider resetting to a different value than the one you set, it is likely that the display state of the Item does not allow enough decimals for the step size of the slider. In that case, make sure that either the state description of the Item is set to the same number of decimals than the step size (so that the display state has the same precision as the slider), or that the
ignoreDisplayState
property is set totrue
.
# Configuration
# General
# item
Item TEXT item
Item to control
# min
Min DECIMAL
Minimum value
# max
Max DECIMAL
Maximum value
# step
Step DECIMAL
Minimum interval between values
# vertical
Vertical BOOLEAN
Display the slider vertically
# label
Display Label BOOLEAN
Display a label above the slider knob while sliding
# scale
Display Scale BOOLEAN
Display a scale on the slider
# scaleSteps
Scale steps INTEGER
Number of (major) scale markers
# scaleSubSteps
Scale sub-steps INTEGER
Number of scale minor markers between each major marker
# unit
Unit TEXT
Unit for the command sent and also append to the label while dragging the cursor, leave empty to use Item's unit
# ignoreDisplayState
Ignore Display State BOOLEAN
Ignore the display state if available and always use the raw state.
# releaseOnly
Send command only on release BOOLEAN
If enabled, no commands are sent during sliding
# commandInterval
Command Interval INTEGER
Time to wait between subsequent commands in ms (default 200)
# delayStateDisplay
Delay State Display INTEGER
Time to wait before switching from displaying user input to displaying item state in ms (default 2000)
# variable
Variable TEXT
Name of the variable to set on input change
# variableKey
Variable Key TEXT
Consider the variable value is an object and set the corresponding deep property within that object using a key syntax. Examples: user.name
, user[0].address[1].street
, [0]
, [0].label
. The inner property and its parent hierarchy will be created if missing.