-
-
Notifications
You must be signed in to change notification settings - Fork 8k
[Draft] Add documentation for Alternative selectors #40847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
cr7pt0gr4ph7
wants to merge
9
commits into
home-assistant:next
Choose a base branch
from
cr7pt0gr4ph7:selector-alternative
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[Draft] Add documentation for Alternative selectors #40847
cr7pt0gr4ph7
wants to merge
9
commits into
home-assistant:next
from
cr7pt0gr4ph7:selector-alternative
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
19 tasks
19 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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:
The intended UI is similar to the Selector selector: Select a type (in this case: a selector type), then provide its parameters below:
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:
select.options.[<index>].fieldsfieldobject.optionsfieldType of change
currentbranch).currentbranch).nextbranch).nextbranch).Additional information
Link to parent pull request in the Brands repository:This PR fixes or closes issue: fixes #Checklist
nextbranch.