Skip to content

v1.4.2: Fix entity domain filter — allow any entity type as trigger#33

Merged
Geek-MD merged 1 commit intomainfrom
copilot/v142-allow-monitoring-multiple-entities
Mar 31, 2026
Merged

v1.4.2: Fix entity domain filter — allow any entity type as trigger#33
Geek-MD merged 1 commit intomainfrom
copilot/v142-allow-monitoring-multiple-entities

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

HA config flow forms are static: placing a domain_filter dropdown and an EntitySelector on the same step means the selector's domain is baked in at render time, so changing the dropdown never updates the entity list. This manifested as the entity picker always showing binary_sensor entities regardless of which domain was selected.

Config flow (FlowHandler)

  • Split async_step_user into two steps:
    • user — collects name + domain filter only
    • first_trigger — renders EntitySelector(domain=[chosen_domain]) on a fresh step, guaranteeing the correct entity list
  • async_step_another_trigger — replaced the server-side entity list builder (SelectSelector + text filter) with a native EntitySelector(EntitySelectorConfig()), enabling any entity domain for additional triggers with built-in search

Options flow (OptionsFlowHandler)

  • Added async_step_trigger_domain (add path) and async_step_edit_trigger_domain (edit path) before the entity selector steps; the edit path pre-selects the current entity's domain as default
  • All entity selector steps now use a domain-filtered EntitySelector

Supporting changes

  • Translations (en.json, es.json, strings.json): added first_trigger, trigger_domain, edit_trigger_domain steps; removed text_filter field from another_trigger
  • manifest.json: bumped to 1.4.2
  • CHANGELOG.md / README.md updated

@Geek-MD
Copy link
Copy Markdown
Owner

Geek-MD commented Mar 31, 2026

Closes #31

@Geek-MD Geek-MD marked this pull request as ready for review March 31, 2026 20:24
@Geek-MD Geek-MD merged commit c6d1f2c into main Mar 31, 2026
5 checks passed
@Geek-MD Geek-MD deleted the copilot/v142-allow-monitoring-multiple-entities branch March 31, 2026 20:24
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.

Only binary sensor entities are shown when selecting a different entity type.

2 participants