hd-stepper
on change− and + beside a value, for what is set in steps: a setpoint, a volume, a fan speed. Bound to a numeric capability with bind (or the explicit form: value with data-hd-on-change). A press steps once; held, it keeps stepping. The value shows at once, and the steps go out as one command once the presses stop, shown as on their way until the Homey reports back. − and + grey out at the ends. The buttons’ colours are CSS properties: --hd-stepper-button, --hd-stepper-button-text and --hd-stepper-button-hover; parts: ::part(button), ::part(minus), ::part(plus).
| Attribute | What it is |
|---|---|
bind | The capability it is bound to, e.g. {{ settings.light.cap.dim }} (the whole capability, no .value): it shows its value, takes min, max and step from it, and sends changes back (shown at once, sprung back if refused, range checked). A device that is unavailable shows its last value, disabled. |
value | The explicit form instead of bind: what it shows, e.g. {{ cap.target_temperature.value }} (or a live capability, followed); a change only goes to data-hd-on-change, which decides what it does. Without a handler it can’t be changed. |
min | Minimum; defaults to the capability’s. |
max | Maximum; defaults to the capability’s. |
step | Step; defaults to the capability’s, else 1. |
unit | Shown after the value; defaults to the capability’s. |
decimals | Digits after the decimal point. |
layout | column stacks it for a tall, narrow tile: + on top, the value, − below.One of row, column. Default row. |
tone | The colour of a button under the pointer and of a value on its way.One of accent, lit, cool. Default accent. |
label | Accessible label; defaults to the capability’s name. |
<hd-stepper bind="{{ cap.target_temperature }}" step="0.5" decimals="1"></hd-stepper>