Skip to content

Conversation

@cr7pt0gr4ph7
Copy link
Contributor

@cr7pt0gr4ph7 cr7pt0gr4ph7 commented Sep 13, 2025

Proposed change

Note

See the next section for different naming proposals.

Add documentation for the (possibly upcoming if accepted) Alternative selector that codifies the pattern of selecting a subtype and providing the corresponding configuration options in a way that makes it accessible to UI:

dns_provider:
  aws:
    access_key: ...
    access_token: ...
# Or:
dns_provider:
  cloudflare:
    api_key: ...
    api_token: ...
# Or:
dns_provider:
  bind:
    server_url: ...
    password: ...
# Or:
...

It is mostly intended for complex Addon configurations (see home-assistant/supervisor#6171 for related discussion) but should be useful for Blueprints as well.

In addition, a secondary mode supports using a discriminator field instead, to allow for generalization of the following pattern:

# Example: Using "condition" as discriminator_field
conditions:
  - condition: numeric_state
    entity_id: sun.sun
    attribute: elevation
    below: 4
  - condition: state
    entity_id: sensor.office_illuminance
    below: 10

# Example: Using "trigger" as discriminator_field
triggers:
  - trigger: state
    entity_id: sensor.office_occupancy
    to: "on"

The intended UI is similar to the Selector selector: Select a type (in this case: a selector type), then provide its parameters below:

  • Card container / Visual grouping
    • Dropdown: Select type
    • Field 1 of selected type (set of fields will change when selected type is changed)
    • ...
    • Field N of selected type

A Note about Naming

I'm not 100% sure about the correct name for this selector type, and whether or not to add it as a standalone selector or as an additional feature to an existing selector. The proposed UI and output data schema remains the same, but the schema for defining the selector itself changes.

For reference, I've considered the following names and options:

  • Add as a new selector type
    • Alternative selector
    • Choice selector
    • Subtype selector
    • Select Object selector
    • Object Alternative selector
    • Object Choice selector
    • Object Options selector
    • Object Select selector
    • Object Subtype selector
    • Object Type selector
    • Object Kind selector
    • Typed Object selector
  • Extend an existing selector type
    • Extend Select selector with select.options.[<index>].fields field
    • Extend Object selector with object.options field

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • Link to core pull request: (TBD)
  • Link to frontend pull request: (TBD)
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in another repo next This PR goes into the next branch labels Sep 13, 2025
@netlify
Copy link

netlify bot commented Sep 13, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 2cc2650
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/68c7eb4620176800083b6771
😎 Deploy Preview https://deploy-preview-40847--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cr7pt0gr4ph7 cr7pt0gr4ph7 changed the title Add documentation for Alternative selectors [Draft] Add documentation for Alternative selectors Sep 13, 2025
@cr7pt0gr4ph7 cr7pt0gr4ph7 marked this pull request as draft September 13, 2025 01:30
@cr7pt0gr4ph7 cr7pt0gr4ph7 marked this pull request as ready for review September 14, 2025 09:20
@cr7pt0gr4ph7 cr7pt0gr4ph7 marked this pull request as draft September 14, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-parent This PR has a parent PR in another repo next This PR goes into the next branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant