Conditions and visibility
Show inputs only when they apply, filter options by sibling values, and gate on device capabilities.
visible conditions
Inputs, sections and pages accept a declarative visible condition evaluated against the answers
collected so far. The wizard hides the element (and skips a hidden page) when it is false.
{ key: 'mode', label: 'Mode', type: 'enum', options: [{ value: 'simple', label: 'Simple' }, { value: 'advanced', label: 'Advanced' }], submitOnChange: true },
{ key: 'threshold', label: 'Threshold', type: 'number',
visible: { input: 'mode', operator: 'equals', value: 'advanced' } },A simple condition is { input, operator, value }. Operators: equals, notEquals, greaterThan,
lessThan, greaterThanOrEqual, lessThanOrEqual (numbers only), contains (strings), in
(value is an array), truthy, falsy. Combine with { and: [...] } / { or: [...] }, nested as
deep as you like.
Conditions are re-evaluated client-side as the person types; add submitOnChange: true to the
controlling input when the server must see the change too (for a dynamic preferences function).
Gating on the picked device
Some options only make sense for some devices. Rather than a condition on a value, gate on the entity a sibling input resolved to:
{ key: 'lights', label: 'Lights', type: 'entity', domainFilter: 'light', multiple: true, required: true },
{ key: 'brightness', label: 'Brightness (0–100)', type: 'number', minValue: 0, maxValue: 100,
requiresEntityFeature: { siblingKey: 'lights', domain: 'light', colorMode: 'brightness' } },requiresEntityFeature hides the input unless the sibling's entity satisfies every constraint you
set: domain (one or several), domainNotEquals, featureBit (tested against the entity's
supportedFeatures, values from getEntityFeatures()), colorMode (must be in
supportedColorModes). While the sibling is empty the input stays visible so people can fill the form
in any order.
requiresSiblingOneOf: { siblingKey, values } is the simpler value-based variant; both compose (AND).
Filtering options by a sibling
For enum inputs, especially inside array rows:
| Option | Effect |
|---|---|
filterOptionsBySiblingPrefix: 'domain' | keep options whose value starts with <sibling value>. — e.g. services keyed light.turnOn filtered by a domain picker |
filterOptionsByEntityDomain: 'entity' | same, but the prefix is the domain of the entity the sibling picked |
domainFilterFrom: 'domain' | for entity inputs: take the domain filter from the sibling's value instead of a static domainFilter |
The hub does not act on these; they are rendering hints for the app, so your code should still validate what it receives.
Presentation hints
widget: 'tiles'renders an enum as a grid of cards (label + optiondescription); pair withsubmitOnChange: truefor a click-to-navigate step.widget: 'textarea'renders a string input as a multi-line box.unit: '°C'on a number: the app shows and edits in the home's unit system and stores the canonical value;unitFromEntity: 'sensor'resolves the unit from a sibling entity (per-row thresholds).