Slider
Sets a number within a range — brightness, a target temperature, a speed. Like a Switch, it reads and writes.
Live preview · sample data
Settings
| Field | What it does |
|---|---|
| Entity | The numeric value to control |
| Slider label | Wording shown beside the slider |
| Min | Lowest value |
| Max | Highest value |
| Slider step | How far each notch moves. 1 for whole numbers, 0.5 for halves |
| Show min and max | Print the end values under the track |
| Color | The track colour |
| Admin only | Hide it from everyone who isn’t an admin of the device — see Sharing a device |
How it works
The handle sits wherever your device last reported the value. Moving it sends the new number down to your firmware:
.entityChanged = [](JsonDoc doc) {
// read the new value and apply it
},Report the value back in sendStatus so the slider stays in step:
.sendStatus = [](JsonDoc doc) {
doc["brightness"] = currentBrightness;
},Choosing a range
Min and max are display settings — they bound what the slider can send, not what your device accepts. Set them to the range your firmware actually handles, and clamp the value on the device as well if an out-of-range number would cause trouble.
A step that’s too fine sends a lot of updates as the handle moves. If your device does something slow in response, a coarser step gives a better result.