Show form fields based on other fields
As of Home Assistant Core 2026.11, config flows, options flows, and blueprints can show a field only while other fields have certain values. You no longer need an extra step, or to show the form again after submit, just to show or hide a few fields. Flows and blueprints use the same visible condition.
Give the Required or Optional marker from homeassistant.data_entry_flow a visible condition:
from homeassistant import data_entry_flow
from homeassistant.helpers.selector import BooleanSelector
DATA_SCHEMA = probatio.Schema(
{
probatio.Required(CONF_SSL, default=False): BooleanSelector(),
data_entry_flow.Required(
CONF_VERIFY_SSL,
default=True,
visible={"field": CONF_SSL, "value": True},
): BooleanSelector(),
}
)The Verify SSL certificate checkbox only shows when Use SSL is checked. While it is hidden, it is not required and its value is not saved.
Read fields that show based on another field for the available conditions and how hidden fields behave.
Blueprint inputs and input sections take the same visible key, next to default and collapsed:
blueprint:
name: Motion light
domain: automation
input:
dim_mode:
name: Dimming
default: none
selector:
select:
options:
- none
- fixed
brightness:
name: Brightness
default: 50
visible:
field: dim_mode
value: fixed
selector:
number:
min: 1
max: 100Brightness only shows when Dimming is set to fixed. A hidden input does not need a value. The automation then gets the input's default (50 here), or None when it has no default, even if a value was entered before the input was hidden. Setting visible on an input section hides the whole section and its inputs.
Read showing inputs based on other inputs in the user documentation for the details.