-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add docs for extract_from_target websocket api #2749
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: master
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughA new WebSocket API command, Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches🧪 Generate unit tests
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. 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 (4)
docs/api/websocket.md (4)
532-536
: Add heading anchor consistency and cross-reference to target spec
All other command headings use a level-2 heading (##
) followed immediately by an explanatory one-liner or cross-reference. “Expand target” introduces a new API that piggy-backs on the existing service call target syntax, yet it doesn’t link to that section (/docs/automation/targets/
) like the other commands do. Adding an anchor link keeps the docs self-navigable and consistent with the rest of the page.## Expand target -This command allows you to expand one or multiple targets into their constituent entities, devices, and areas. +This command allows you to expand one or multiple targets into their constituent entities, devices, and areas. +See the complete target schema in the +[service call target documentation](/docs/automation/target/) for the field syntax.
540-548
: Minor sample-data improvements
The example mixes “kitchen” and “living_room” areas, yet only “kitchen” is provided in the request. Consider either (a) expanding both areas in the request, or (b) limiting the response to match the request. This avoids the impression that the command adds unrelated areas.
551-557
: Clarifyreferenced_*
vsmissing_*
semantics
A one-sentence “The response includes:” list is provided, but there is no definition of how missing IDs are determined (e.g., nonexistent vs. filtered by permissions). A short clarification helps integrators interpret failures properly.-The response includes: +The response includes (all arrays contain raw IDs):And add after the bullet list:
> **Note:** Items appear in a `missing_*` list only if the caller references > an ID that does **not** exist in the current Home Assistant instance > (regardless of user permissions). Missing items are **not** returned due > to access restrictions; those are simply omitted from the corresponding > `referenced_*` list.
540-548
: JSON comment lines are fine, but keep them uniform
Throughout the page, comment lines inside JSON use// Optional
. In this snippet the explanatory line forexpand_group
also uses that style—good. However, the intro comment (// Optional
) line is missing before thetarget
object although that field is mandatory. Consider adding// Required
for symmetry with neighbouring examples.
📜 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)
docs/api/websocket.md
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules - developers-home-assistant
- GitHub Check: Header rules - developers-home-assistant
- GitHub Check: Pages changed - developers-home-assistant
🔇 Additional comments (1)
docs/api/websocket.md (1)
573-580
:missing_floors
field lacks prior context
“floor” IDs have not been mentioned anywhere else in the WebSocket chapter or the target documentation. Introduce a short phrase explaining floors or remove the field until the floor concept is documented to avoid confusion.
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.
Can be merged when the parent PR is merged.
Proposed change
SSIA.
Type of change
Checklist
Additional information
Summary by CodeRabbit
extract_from_target
, detailing its parameters and response structure, including how to specify targets, expand groups, and handle missing references.