Skip to content

Conversation

@gjohansson-ST
Copy link
Member

@gjohansson-ST gjohansson-ST commented Oct 26, 2025

Proposed change

Adds description for use of async_on_create_entry
Core PR: home-assistant/core#155016

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
  • 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

  • This PR fixes or closes issue: fixes #
  • Link to relevant existing code or pull request:

Summary by CodeRabbit

  • Documentation
    • Added documentation for the async_on_create_entry functionality
    • Includes practical code examples demonstrating how to modify configuration entry results
    • Shows how to enable subsequent subentry configuration flows

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 26, 2025

📝 Walkthrough

Walkthrough

Documentation update to docs/config_entries_config_flow_handler.md adding a new section titled "Use async_on_create_entry" that explains how to modify the final ConfigFlowResult after a config entry is created, including code examples demonstrating the async_on_create_entry method for initiating subentry flows.

Changes

Cohort / File(s) Summary
Documentation: async_on_create_entry feature
docs/config_entries_config_flow_handler.md
Adds new documentation section explaining the async_on_create_entry option, including method signature and code examples showing how to set result["next_flow"] to create subentry flows after config entry creation

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Code example verification: Confirm the async_on_create_entry and async_step_user examples are syntactically correct and accurately reflect the feature functionality
  • Documentation clarity: Verify the explanation of modifying ConfigFlowResult and setting next_flow is clear and complete

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description follows the required template structure with a proposed change section, type of change selection, checklist, and additional information fields. The proposed change is substantive, describing the addition of async_on_create_entry documentation and linking to the relevant Core PR #155016. However, the two checklist items that require verification—confirming adherence to documentation guidelines and verification of proper rendering—remain unchecked, which represents an incomplete fulfillment of the template's explicit requirements.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add async_on_create_entry documentation" is clear, concise, and directly summarizes the main change. The title accurately reflects the addition of a new documentation section describing the async_on_create_entry feature, which aligns with the raw summary showing documentation additions to config_entries_config_flow_handler.md. The title is specific enough for a teammate scanning history to understand the primary change without ambiguity.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gj-20251026-01

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (1)
docs/config_entries_config_flow_handler.md (1)

527-529: Make the explanation more direct and align with Microsoft Style Guide.

The phrasing is indirect and could be clearer. Rewrite to front the goal and use active language:

-The `async_on_create_entry` provides an option to modify the final `ConfigFlowResult` after the config entry has been created and the flow finalizes.
+Use `async_on_create_entry` to modify the final `ConfigFlowResult` after the config entry has been created.

-As subentry flows and option flows are dependent on that the main config entry exist before they can be started, it is suitable to use for this purpose as provided in the following example:
+Subentry flows and option flows require the main config entry to exist first, making this method ideal for initiating these flows after entry creation.
📜 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

📥 Commits

Reviewing files that changed from the base of the PR and between fdacf2c and 4d9ba00.

📒 Files selected for processing (1)
  • docs/config_entries_config_flow_handler.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
*/**(html|markdown|md)

⚙️ CodeRabbit configuration file

*/**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

*/**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

  • Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"

  • Use sentence-style capitalization also in headings.

do not comment on HTML used for icons

Avoid flagging inline HTML for embedding videos in future reviews for this repository.

Files:

  • docs/config_entries_config_flow_handler.md
⏰ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants