Use Cases
Overview
Each use case below pairs a working Configuration Schema with the device-side set-config payload that drives it, so you can adapt a proven example instead of building from scratch.
Pick the one closest to what you need:
| Use case | Use it when |
|---|---|
| Hiding fields until the device reports a capability | Hardware is optional or removable (a Wi‑Fi card, an expansion module), and its settings should disappear when it isn't installed. Keyed on a boolean the device reports. |
| Switching the schema per firmware generation | One model has units on different firmware, and each generation needs a different set of sections. Keyed on a schema_version the device reports — a version number, a label, or a firmware codename. |
Both patterns rely on JSON Schema draft-07 conditionals (if / then, allOf, $ref), which the model's Config Schema editor supports. Drafts above 7 are not supported.
Every$idin a schema must be unique
$idvalues are registered across the whole schema document. If two branches declare the same$id, the schema fails to compile and the condition silently evaluates as false — the form quietly renders the wrong branch with no error shown. Give each branch a distinct$id, or leave$idout of the branches entirely; it isn't required for the form to render.
Updated 14 days ago
