Skip to content

Fix outdated auth and intent API reference documentation to match core#3241

Merged
frenck merged 3 commits into
masterfrom
claude/dev-docs-home-assistant-compare-9xinvk-api-reference
Jul 12, 2026
Merged

Fix outdated auth and intent API reference documentation to match core#3241
frenck merged 3 commits into
masterfrom
claude/dev-docs-home-assistant-compare-9xinvk-api-reference

Conversation

@balloob

@balloob balloob commented Jul 9, 2026

Copy link
Copy Markdown
Member

Proposed change

Corrects the auth and intent API reference docs to match current Home Assistant Core:

  • auth_auth_provider.mdasync_login_flow now takes a context: AuthFlowContext | None parameter; updated the documented signature.
  • auth_api.md — documented the current dedicated POST /auth/revoke endpoint for revoking a refresh token, and noted the old /auth/token action=revoke form is deprecated (kept for backwards compatibility). Removed the invalid "client_icon": null from the auth/long_lived_access_token example (the schema is vol.Optional("client_icon"): str, so null fails validation).
  • intent_conversation_api.md — the response data object no longer emits a top-level targets array; IntentResponse.as_dict() puts only success and failed lists (of {name, type, id} targets) into data. Reshaped the examples/prose accordingly, and added the missing floor target type.
  • intent_builtin.md — removed HassToggle from the deprecated intents list/section; it is a currently registered, supported intent.

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features for which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Editing or restructuring documentation guidelines
  • Changes to the backend of this documentation
  • Remove stale or deprecated documentation

Checklist

  • I have read and followed the documentation guidelines.
  • I have verified that my changes render correctly in the documentation.

Additional information

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated refresh-token revocation documentation to use a dedicated revocation endpoint (POST /auth/revoke), including revised form-field examples, notes about client_id being unnecessary, and behavior details (HTTP 200 with empty body) plus backward-compatibility for the deprecated flow.
    • Adjusted the AuthProvider documentation for the updated async_login_flow signature with an optional context parameter.
    • Updated intent conversation API response examples to match the new data.success/data.failed per-target structure.

- 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
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00a20902-8425-486a-a49a-a0cd8f289afb

📥 Commits

Reviewing files that changed from the base of the PR and between 124ae18 and 144f5dc.

📒 Files selected for processing (1)
  • docs/intent_conversation_api.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/intent_conversation_api.md

📝 Walkthrough

Walkthrough

Documentation updates revise auth revocation behavior, the documented AuthProvider.async_login_flow signature, and intent conversation response examples and field descriptions.

Changes

Documentation updates

Layer / File(s) Summary
Auth revocation docs
docs/auth_api.md
Documents POST /auth/revoke with token=..., empty-body HTTP 200 responses, deprecated action=revoke behavior on /auth/token, and removes client_icon from the long-lived access token example.
AuthProvider signature docs
docs/auth_auth_provider.md
Documents async_login_flow as accepting an optional context: AuthFlowContext | None parameter.
Intent conversation response docs
docs/intent_conversation_api.md
Rewrites action_done and query_answer examples and text to use data.success and data.failed target lists, and adds floor to the target ordering guidance.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main documentation refresh for auth and intent API references.
Description check ✅ Passed The template is mostly complete and clearly explains the doc updates, selected change type, checklist, and code links.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/dev-docs-home-assistant-compare-9xinvk-api-reference

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread docs/intent_builtin.md
| --------- | ---- | -------- | -----------
| name | string | Yes | Name of the cover entity to close.

### HassToggle

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's keep it as deprecated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1b7c60f and 124ae18.

📒 Files selected for processing (3)
  • docs/auth_api.md
  • docs/auth_auth_provider.md
  • docs/intent_conversation_api.md

Comment thread docs/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
@frenck
frenck merged commit d2bb484 into master Jul 12, 2026
5 checks passed
@frenck
frenck deleted the claude/dev-docs-home-assistant-compare-9xinvk-api-reference branch July 12, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants