Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve blueprint schema explanation #39318

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

Merged
merged 5 commits into from
Jun 4, 2025

Conversation

MarkusBiggus
Copy link
Contributor

@MarkusBiggus MarkusBiggus commented May 30, 2025

Proposed change

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • Link to parent pull request in the codebase:
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • Documentation
    • Improved and clarified the blueprint schema documentation, including detailed explanations of metadata, supported domain types, input handling, and version requirements.
    • Updated examples and terminology for greater precision and consistency.
    • Added cautions and refined guidance regarding input sections and minimum Home Assistant version requirements.

Explain blueprint domain more clearly using consistent language with previously defined terms to describe schema components.
Explain blueprint domain more clearly using consistent language with previously defined terms to describe schema components.
@home-assistant home-assistant bot added the current This PR goes into the current branch label May 30, 2025
Copy link

netlify bot commented May 30, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 10164e2
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/683ff6746306fd00081db53a
😎 Deploy Preview https://deploy-preview-39318--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

coderabbitai bot commented May 30, 2025

📝 Walkthrough

Walkthrough

The blueprint schema documentation was revised to clarify metadata fields, explicitly list supported domain types, refine input descriptions, and update terminology. The required metadata now includes both name and domain. Guidance on input types, referencing, and version requirements was improved, and example sections were updated for consistency and clarity.

Changes

File Change Summary
source/_docs/blueprint/schema.markdown Expanded and clarified documentation for blueprint metadata, domain types, input handling, and examples

Sequence Diagram(s)

No sequence diagram generated as the changes are limited to documentation updates.


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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 (5)
source/_docs/blueprint/schema.markdown (5)

19-19: Correct plural agreement in subject–verb
The sentence reads “Blueprint schemas currently supports…” but “schemas” is plural and should pair with “support.”
Apply this diff:

- Blueprint schemas currently supports three types of schema depending on its domain:
+ Blueprint schemas currently support three domain types—automation, script, and template:
🧰 Tools
🪛 LanguageTool

[grammar] ~19-~19: It seems that the correct verb form here is “support”.
Context: ...int schema Blueprint schemas currently supports three types of schema depending on its ...

(AGREEMENT_SENT_START_2)


23-24: Use consistent serial comma and wording
Consider rephrasing the list for clarity and consistency with the rest of the doc:

- 1. The blueprint's high-level metadata: name, domain and, optionally, any input required from the user.
+ 1. The blueprint's high-level metadata: name, domain, and optionally any inputs required from the user.

53-56: Avoid repetitive phrasing in description
Instead of “Describe what the blueprint does and describe the inputs…,” streamline to:

- Describe what the blueprint does and describe the inputs the blueprint requires.
+ Explain the blueprint’s functionality and the inputs it requires.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~54-~54: Possible missing comma found.
Context: ...ecommended. Describe what the blueprint does and describe the inputs the blueprint r...

(AI_HYDRA_LEO_MISSING_COMMA)


58-63: Refine domain listing for readability
List the supported domains in a single, clear sentence:

- The domain in which this blueprint is used. Currently, only three types,
- [`automation`](/docs/automation/yaml/), `script` and [`template`](/integrations/template/#using-blueprints) are supported.
+ The domain in which this blueprint is used. Currently, only three domains are supported: [`automation`](/docs/automation/yaml/), `script`, and [`template`](/integrations/template/#using-blueprints).

94-94: Use “one or more” for numerical consistency
Replace “one or multiple” with the more conventional “one or more”:

- A blueprint can accept one or multiple inputs from the user, but does not require any input.
+ A blueprint can accept one or more inputs from the user but does not require any.
📜 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 3d4fd0d and 777d1d0.

📒 Files selected for processing (1)
  • source/_docs/blueprint/schema.markdown (9 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_docs/blueprint/schema.markdown

[grammar] ~19-~19: It seems that the correct verb form here is “support”.
Context: ...int schema Blueprint schemas currently supports three types of schema depending on its ...

(AGREEMENT_SENT_START_2)


[uncategorized] ~54-~54: Possible missing comma found.
Context: ...ecommended. Describe what the blueprint does and describe the inputs the blueprint r...

(AI_HYDRA_LEO_MISSING_COMMA)

⏰ 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 (6)
source/_docs/blueprint/schema.markdown (6)

68-72: Approve clear homeassistant version description
The updated description clearly specifies the required Home Assistant version.


96-98: Approve updated input type enumeration
The change to “string, boolean, list, map” aligns with schema terminology and is clear.


128-132: Approve clarification of !input tag usage
The wording now explicitly notes the tag precedes the input name, improving clarity.

🧰 Tools
🪛 LanguageTool

[style] ~128-~128: This phrase is redundant. Consider using “outside”.
Context: ...} Each input field can be referred to, outside of the blueprint metadata, using the `!inp...

(OUTSIDE_OF)


162-166: Approve introduction to input section configuration
The heading succinctly signals that the full schema follows.


193-197: Approve example schema with input section
The added example clarifies how to structure inputs within a section.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

195-195: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


196-196: Multiple consecutive blank lines
Expected: 1; Actual: 3

(MD012, no-multiple-blanks)


232-237: Approve built-in blueprint note enhancement
The added note underscores the separation of blueprint schema and domain schema, improving understanding.

@frenck frenck requested a review from Copilot June 3, 2025 10:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Improves the blueprint schema documentation by clarifying metadata requirements, refining input and section explanations, and standardizing terminology and grammar.

  • Clarified metadata fields to explicitly require domain and refined descriptions.
  • Expanded guidance on input sections with version requirements and updated examples.
  • Standardized terms (e.g., map vs dictionary) and corrected punctuation and grammar.

@@ -16,16 +16,18 @@ related:

## The blueprint schema

Blueprint schemas currently supports three types of schema depending on its domain: [`automation`](/docs/automation/yaml/); `script`; and [`template`](/integrations/template/#using-blueprints).
Copy link
Preview

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

[nitpick] Subject–verb agreement: change 'Blueprint schemas currently supports' to 'Blueprint schemas currently support'.

Suggested change
Blueprint schemas currently supports three types of schema depending on its domain: [`automation`](/docs/automation/yaml/); `script`; and [`template`](/integrations/template/#using-blueprints).
Blueprint schemas currently support three types of schema depending on its domain: [`automation`](/docs/automation/yaml/); `script`; and [`template`](/integrations/template/#using-blueprints).

Copilot uses AI. Check for mistakes.

The configuration schema of a blueprint consists of 2 parts:

1. The blueprint's high-level metadata: name, description, the input required from the user.
2. The schema of the thing the blueprint describes.
1. The blueprint's high-level metadata: name, domain and, optionally, any input required from the user.
Copy link
Preview

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

[nitpick] Remove the comma after 'and' to read 'domain and optionally any input required from the user' for correct punctuation.

Suggested change
1. The blueprint's high-level metadata: name, domain and, optionally, any input required from the user.
1. The blueprint's high-level metadata: name, domain and optionally any input required from the user.

Copilot uses AI. Check for mistakes.

@@ -232,7 +232,8 @@ variables:
The [built-in blueprints][blueprint-built-in]
are great examples to get a bit of a feeling of how blueprints work.

Here is the built-in motion light automation blueprint:
Here is the built-in motion light automation blueprint.
Note the *blueprint schema* under the blueprint key is followed by its domain schema. In this example, an automation schema.
Copy link
Preview

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

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

[nitpick] For clarity, add 'that' after 'Note': 'Note that the blueprint schema...'.

Suggested change
Note the *blueprint schema* under the blueprint key is followed by its domain schema. In this example, an automation schema.
Note that the *blueprint schema* under the blueprint key is followed by its domain schema. In this example, an automation schema.

Copilot uses AI. Check for mistakes.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @MarkusBiggus 👍

../Frenck

@frenck frenck merged commit 5ffbce7 into home-assistant:current Jun 4, 2025
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
current This PR goes into the current branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants