Skip to content

Use template for query in SQL #40345

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

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open

Use template for query in SQL #40345

wants to merge 1 commit into from

Conversation

gjohansson-ST
Copy link
Member

Proposed change

Change query from being a string to a template in SQL integration

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

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.

@Copilot Copilot AI review requested due to automatic review settings August 8, 2025 22:12
@home-assistant home-assistant bot added has-parent This PR has a parent PR in another repo next This PR goes into the next branch labels Aug 8, 2025
Copy link

netlify bot commented Aug 8, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit b1bc7bc
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/6896763b8fc35c000738bac3
😎 Deploy Preview https://deploy-preview-40345--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

@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

This PR updates the SQL integration documentation to reflect a change where the query configuration parameter now accepts templates instead of plain strings. This aligns the documentation with the corresponding code change in Home Assistant core that enables template functionality for SQL queries.

@@ -81,7 +81,7 @@ sql:
query:
description: An SQL QUERY string, should return 1 result at most.
required: true
type: string
type: template
Copy link
Preview

Copilot AI Aug 8, 2025

Choose a reason for hiding this comment

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

The documentation should include an example of how to use templates in SQL queries and explain the benefits of this change, such as the ability to use dynamic values from Home Assistant state or attributes.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a comment

Choose a reason for hiding this comment

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

Thank you, @gjohansson-ST 👍

@c0ffeeca7 c0ffeeca7 added the awaits-parent Awaits the merge of an parent PR label Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaits-parent Awaits the merge of an parent PR has-parent This PR has a parent PR in another repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants