Fix outdated auth and intent API reference documentation to match core#3241
Conversation
- docs/auth_auth_provider.md: document the `context: AuthFlowContext | None` parameter on `async_login_flow`. - docs/auth_api.md: document `POST /auth/revoke` as the current refresh token revocation endpoint and note the `/auth/token` `action=revoke` form is deprecated; remove the invalid `"client_icon": null` from the `auth/long_lived_access_token` example. - docs/intent_conversation_api.md: fold targeted areas/entities into the `success`/`failed` arrays instead of a non-existent top-level `data.targets` array, and add `floor` to the target type list. - docs/intent_builtin.md: remove `HassToggle` from the deprecated intents list, as it is a currently supported intent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XRizr1PuMrPu8Z16JChguS
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughDocumentation updates revise auth revocation behavior, the documented ChangesDocumentation updates
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| | --------- | ---- | -------- | ----------- | ||
| | name | string | Yes | Name of the cover entity to close. | ||
|
|
||
| ### HassToggle |
There was a problem hiding this comment.
let's keep it as deprecated.
There was a problem hiding this comment.
Done — reverted that change so HassToggle stays in the deprecated intents list and section (pushed in 124ae18). The rest of the PR (auth revoke endpoint, client_icon, and the intent_conversation_api targets reshape) is unchanged.
Generated by Claude Code
Per maintainer feedback, retain HassToggle in the deprecated intents list and section. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XRizr1PuMrPu8Z16JChguS
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/intent_conversation_api.md`:
- Around line 95-114: The target-ordering section in intent_conversation_api.md
is missing floor even though the schema table already includes it, so the
target-type list is inconsistent. Update the ordered target list in the
action_done response example/docs to include floor alongside the other target
types, using the same terminology as the schema table and the surrounding
success/failed target descriptions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e5787d33-893b-42ff-894d-62e0e3e79b3f
📒 Files selected for processing (3)
docs/auth_api.mddocs/auth_auth_provider.mddocs/intent_conversation_api.md
The schema table lists floor as a target type; add it to the general-to-specific target ordering list for consistency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XRizr1PuMrPu8Z16JChguS
Proposed change
Corrects the auth and intent API reference docs to match current Home Assistant Core:
async_login_flownow takes acontext: AuthFlowContext | Noneparameter; updated the documented signature.POST /auth/revokeendpoint for revoking a refresh token, and noted the old/auth/tokenaction=revokeform is deprecated (kept for backwards compatibility). Removed the invalid"client_icon": nullfrom theauth/long_lived_access_tokenexample (the schema isvol.Optional("client_icon"): str, sonullfails validation).dataobject no longer emits a top-leveltargetsarray;IntentResponse.as_dict()puts onlysuccessandfailedlists (of{name, type, id}targets) intodata. Reshaped the examples/prose accordingly, and added the missingfloortarget type.HassTogglefrom the deprecated intents list/section; it is a currently registered, supported intent.Type of change
Checklist
Additional information
auth/providers/__init__.py,components/auth/__init__.py,helpers/intent.py🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit
POST /auth/revoke), including revised form-field examples, notes aboutclient_idbeing unnecessary, and behavior details (HTTP 200 with empty body) plus backward-compatibility for the deprecated flow.AuthProviderdocumentation for the updatedasync_login_flowsignature with an optional context parameter.data.success/data.failedper-target structure.