Checklist:
Description:
When an addon's configuration page has a field that lets you add multiple items (like the Samba addon's "Enabled shares" field), the input box says "Search | add custom item" and shows a dropdown area when you click it — but the dropdown is always empty. There are no suggestions to pick from. You have to already know the exact valid values and type them in manually. If you type something wrong, you don't find out until you click Save, and then you get a regex error message.
Meanwhile, the exact same looking input box is used elsewhere in Home Assistant (for example, when editing an automation's entity state trigger, the "Attribute" field). In those other places, the dropdown actually shows suggestions you can pick from.
The issue is that addon configuration pages can't provide a list of suggested values to populate that dropdown, even though the widget clearly supports it. This makes the Samba-style multi-select field a bad UX — users have to go find the list of valid values somewhere else (docs, forum, README) and type them in from memory.
Expected behavior:
When an addon schema declares a multi-value field with a known set of allowed values, the dropdown should show those values as selectable suggestions, the same way it works in the automation entity attribute picker.
Steps to reproduce:
- Open the Samba addon (or any addon with a
[match(...)] or [str] schema field)
- Go to the Configuration tab
- Click on the "Enabled shares" (or equivalent multi-value) field
- Observe that the dropdown area is empty — no suggestions appear even though there's a fixed list of valid values (
addons, addon_configs, backup, config, media, share, ssl)
- Now compare this to creating a new automation, choose an entity state trigger, pick an entity, and click on the "Attribute" field — the dropdown shows all the entity's attributes as suggestions
Home Assistant Core version: latest
Browser: Any
⚠️ Warning: the following section is AI-generated. The above description is my own words. Below is what an AI thinks the problem is and how to fix it — I have not personally verified every line of code referenced here, but the analysis looks sound and is offered as a starting point for whoever works on the fix.
AI-generated analysis and proposed fix
The relevant code is in src/panels/config/apps/app-view/config/supervisor-app-config.ts in the _convertSchemaElementToSelector method.
The Supervisor backend does the right thing: for a schema like protocols: [list(http|https|mqtt|ws)], supervisor/addons/options.py in the _single_ui_option / _ui_schema_element chain correctly emits a UI node with type: "select", options: [http, https, mqtt, ws], and multiple: true.
The frontend converter then does this:
if (entry.type === "select") {
return { select: { options: entry.options } }; // <-- entry.multiple is dropped
}
if (entry.type === "string") {
return entry.multiple
? { select: { options: [], multiple: true, custom_value: true } }
: { text: { type: ... } };
}
Two separate problems in these lines:
- The
"select" branch drops entry.multiple. So [list(a|b|c)] renders as a single-select dropdown, not a multi-select chip input.
- The
"string" branch (which handles [str] and [match(regex)]) hard-codes options: []. So the multi-select chip input from those schemas has no suggestions to show, which is the Samba behavior described above.
The ha-selector-select widget fully supports {multiple: true, options: [...non-empty]} — it's what the automation attribute picker uses via ha-entity-attribute-picker → ha-generic-picker → ha-picker-combo-box. The widget works, but no code path from addon config constructs that shape.
Proposed fix (3 lines):
if (entry.type === "select") {
return {
select: {
options: entry.options,
multiple: entry.multiple,
},
};
}
This mirrors the entry.multiple handling already present in the "string" branch immediately below. With this fix, addon authors can use [list(a|b|c)] to get a proper multi-select chip input with populated suggestions — matching the automation attribute picker UX.
References that support this analysis:
Checklist:
Description:
When an addon's configuration page has a field that lets you add multiple items (like the Samba addon's "Enabled shares" field), the input box says "Search | add custom item" and shows a dropdown area when you click it — but the dropdown is always empty. There are no suggestions to pick from. You have to already know the exact valid values and type them in manually. If you type something wrong, you don't find out until you click Save, and then you get a regex error message.
Meanwhile, the exact same looking input box is used elsewhere in Home Assistant (for example, when editing an automation's entity state trigger, the "Attribute" field). In those other places, the dropdown actually shows suggestions you can pick from.
The issue is that addon configuration pages can't provide a list of suggested values to populate that dropdown, even though the widget clearly supports it. This makes the Samba-style multi-select field a bad UX — users have to go find the list of valid values somewhere else (docs, forum, README) and type them in from memory.
Expected behavior:
When an addon schema declares a multi-value field with a known set of allowed values, the dropdown should show those values as selectable suggestions, the same way it works in the automation entity attribute picker.
Steps to reproduce:
[match(...)]or[str]schema field)addons,addon_configs,backup,config,media,share,ssl)Home Assistant Core version: latest
Browser: Any
AI-generated analysis and proposed fix
The relevant code is in
src/panels/config/apps/app-view/config/supervisor-app-config.tsin the_convertSchemaElementToSelectormethod.The Supervisor backend does the right thing: for a schema like
protocols: [list(http|https|mqtt|ws)],supervisor/addons/options.pyin the_single_ui_option/_ui_schema_elementchain correctly emits a UI node withtype: "select",options: [http, https, mqtt, ws], andmultiple: true.The frontend converter then does this:
Two separate problems in these lines:
"select"branch dropsentry.multiple. So[list(a|b|c)]renders as a single-select dropdown, not a multi-select chip input."string"branch (which handles[str]and[match(regex)]) hard-codesoptions: []. So the multi-select chip input from those schemas has no suggestions to show, which is the Samba behavior described above.The
ha-selector-selectwidget fully supports{multiple: true, options: [...non-empty]}— it's what the automation attribute picker uses viaha-entity-attribute-picker→ha-generic-picker→ha-picker-combo-box. The widget works, but no code path from addon config constructs that shape.Proposed fix (3 lines):
This mirrors the
entry.multiplehandling already present in the"string"branch immediately below. With this fix, addon authors can use[list(a|b|c)]to get a proper multi-select chip input with populated suggestions — matching the automation attribute picker UX.References that support this analysis:
condition: list(equal|not_equal)as an example, confirminglist(a|b|c)is an officially supported schema typelist(a|b|c)syntax as a first-class schema typelist(MONO|BWR|BWY|...)in its own example