Skip to content

ux: group device filter list by home, remove two-step home_ids filter - #2922

Closed
jingyulong wants to merge 4 commits into
al-one:masterfrom
jingyulong:redesign-device-filter
Closed

ux: group device filter list by home, remove two-step home_ids filter#2922
jingyulong wants to merge 4 commits into
al-one:masterfrom
jingyulong:redesign-device-filter

Conversation

@jingyulong

Copy link
Copy Markdown

Fixes discussion in #2921.

Problem

The cloud device filter step mixed devices from every home into one flat multi-select, with a two-step home_ids filter that required submitting the form twice. Users routinely imported devices from shared homes by accident (see #2921 for the full story).

Changes

  • get_cloud_filter_schema (via_did): render one multi-select per home, keyed home__<home name>; devices without a home go under Default Home; the flat did_list field and the two-step home_ids field are removed from the form
  • Config + options flows: merge all home__* groups back into did_list on submit
  • Keep the exclude/include semantics unchanged (labels improved in ux: group device filter by home (structural redesign + wording clarification) #2920)

Verification

  • New tests tests/test_cloud_filter_grouped.py (3 cases: grouped schema, preserved selection, submit merge)
  • Prototype validated end-to-end on a production HA 2026.8.1 instance against the v1.1.4 release

Screenshots

Before After
before after

Open as draft per the discussion-first plan in #2921 — happy to adapt (e.g. keep home_ids as an optional extra) if preferred.

The cloud device filter step mixed devices from every home into one
flat multi-select, with a confusing two-step "home_ids" filter that
required submitting the form twice. Users routinely imported devices
from shared homes by accident.

- Render one multi-select per home, keyed home__<home name>, with
  devices that have no home grouped under "Default Home"
- Remove the home_ids two-step filter from the form
- Merge all home__* groups back into did_list on submit (both the
  config and options flows)
- Add tests for the grouped schema and the submit merge

Wording fixes for the filter step are in PR al-one#2920.
- Devices without a home assignment (nearby/offline devices) are no
  longer shown in a synthetic 'Default Home' group
- Keep the exclude/include labels and filter_did description in sync
  with PR al-one#2920
- Replace the flat cv.multi_select (inline checkbox list) with
  selector.SelectSelector(multiple, mode=dropdown) so each home group
  renders as a standard dropdown with removable chips
- Drop the redundant filter_did field description; fold the
  "checking none includes all" warning into the step description
- Label home-less devices as "Unassigned devices (nearby/offline)"
  via a static translation key, placed after the real homes
The HA frontend renders multi_select fields automatically: groups with
fewer than 6 options as checkboxes and larger groups as dropdowns
(SHOW_ALL_ENTRIES_LIMIT in ha-form-multi_select), so the explicit
SelectSelector(dropdown) is redundant.
@jingyulong

Copy link
Copy Markdown
Author

Superseded by #2920 — the same commits are now on that PR (single PR for both the wording clarification and the grouped-by-home redesign).

@jingyulong jingyulong closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant