hd-segmented
on changeOne of a few choices side by side, the chosen one filled: a thermostat’s mode, a fan’s speed, a house mode. Bound with bind to a capability with choices (an enum), they come from it, in its order and named as Homey names them; otherwise options lists them. The choice shows at once and is sent, shown as on its way until the Homey reports it back. More than fit scroll sideways, the chosen one kept in view. With value and data-hd-on-change a handler decides what a choice does (setState, setVariable).
| 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. {{ state.mode }} (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. |
options | The choices as value:Name, separated by commas, e.g. eco:Eco,comfort:Comfort; with bind it renames the capability’s. |
tone | The colour of the chosen one.One of accent, lit, cool. Default accent. |
label | Accessible label for the group. |
<hd-segmented bind="{{ cap.thermostat_mode }}" options="auto:Auto,heat:Heat,off:Off" label="Mode"></hd-segmented>