-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Support multiple
for StateSelector
#39419
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
base: next
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe documentation for the "State selector" in blueprint selectors was updated to support selecting multiple states. A new optional boolean configuration option, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant StateSelector
User->>StateSelector: Configure selector (multiple: true/false)
User->>StateSelector: Make selection(s)
alt multiple = false
StateSelector-->>User: Return selected state (string)
else multiple = true
StateSelector-->>User: Return selected states (list of strings)
end
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
source/_docs/blueprint/selectors.markdown (2)
1318-1320
: Fix minor grammar in output description
Change “select state” to “selected state” for clarity and consistency.Apply this diff:
- The output of this selector is the select state (not the translated or prettified name shown in the frontend), or a list of states if `multiple` is true. + The output of this selector is the selected state (not the translated or prettified name shown in the frontend), or a list of states if `multiple` is true.
1321-1322
: Add example for multiple‐state output
Illustrate themultiple: true
behavior with a YAML snippet.For example, insert after the existing example:
# Example state selector output result, when multiple is set to true - heat - cool
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
source/_docs/blueprint/selectors.markdown
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules - home-assistant-docs
- GitHub Check: Header rules - home-assistant-docs
- GitHub Check: Pages changed - home-assistant-docs
🔇 Additional comments (2)
source/_docs/blueprint/selectors.markdown (2)
1299-1301
: Documentation updated for multi‐select support
The description now correctly states that one or more states can be selected, aligning with the newmultiple
feature.🧰 Tools
🪛 LanguageTool
[uncategorized] ~1299-~1299: Possible missing comma found.
Context: ...r shows a list of states for a provided entity of which one or more can be selected. ...(AI_HYDRA_LEO_MISSING_COMMA)
1309-1316
:multiple
option follows established pattern
The new booleanmultiple
key (defaultfalse
, optional) is placed and documented consistently with other selectors.
Proposed change
Allow selecting multiple states with the state selector.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
multiple
for StateSelector core#146288Checklist
current
branch.next
branch.Summary by CodeRabbit
multiple
configuration option, including its default behavior and impact on output format.