Skip to content

Update templating.markdown #38961

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 7 commits into
base: current
Choose a base branch
from

Conversation

MarkusBiggus
Copy link
Contributor

@MarkusBiggus MarkusBiggus commented May 9, 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
    • Updated the title and description to clarify the focus on automation template variables.
    • Expanded the introduction with details on advanced templating features and provided a usage example.
    • Clarified explanations for this and trigger variables and standardized related terminology.
    • Standardized formatting for tables listing template variables across all trigger types.
    • Added documentation for new trigger types: Geolocation, Home Assistant, and Tag.
    • Improved wording, punctuation, and link formatting throughout the document.

Basic Automations show the use of Templating, which is an Advanced configuration feature. Make this clear, and include an example to introduce what templating looks like.
Use consistent language to describe template variables and include some term definitions.

Add additional template variable tables linked back to triggers on the event-trigger page for: Home Assistant, Tag & Geolocation.
@home-assistant home-assistant bot added the current This PR goes into the current branch label May 9, 2025
Copy link

netlify bot commented May 9, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 5fe39bb
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/681eb38ec2ac2e000852ac1e
😎 Deploy Preview https://deploy-preview-38961--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 site configuration.

Copy link
Contributor

coderabbitai bot commented May 9, 2025

Warning

Rate limit exceeded

@MarkusBiggus has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 54 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 45543f1 and 5fe39bb.

📒 Files selected for processing (1)
  • source/_docs/automation/templating.markdown (7 hunks)
📝 Walkthrough

"""

Walkthrough

The documentation for automation templates was updated with a new title, expanded introduction, clarified descriptions, and standardized formatting. New trigger types and their template variables were added, and existing content was refined for clarity and consistency. No code or API changes were made; all updates were content and formatting improvements.

Changes

File Change Summary
source/_docs/automation/templating.markdown Updated title and description; expanded introduction; clarified and standardized trigger variable documentation; added new trigger types (Geolocation, Home Assistant, Tag); improved formatting and consistency throughout; fixed link formatting.

Sequence Diagram(s)

No sequence diagram generated as the changes are limited to documentation content and formatting.
"""


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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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: 2

🧹 Nitpick comments (3)
source/_docs/automation/templating.markdown (3)

8-12: Improve fenced code block formatting
The example block should be surrounded by blank lines and specify a language for syntax highlighting. For instance:

-Example of variables used in templates:
-```
- {{ this.name }} is the name of the automation executing from this trigger
- {{ trigger.platform }} is the type of trigger object, like `calendar`
- ```
+Example of variables used in templates:
+
+```jinja
+{{ this.name }} is the name of the automation executing from this trigger
+{{ trigger.platform }} is the type of trigger object, like `calendar`
+```
+
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

9-9: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


9-9: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


16-17: Refine punctuation and pronoun usage
Add a comma for clarity and use “who” when referring to a person:

-The template variable `this` is an object ... 
-State objects also contain context data which can be used to identify the user that caused a {% term script %} or {% term automation %} to execute.
+The template variable `this` is an object ...
+State objects also contain context data, which can be used to identify the user who caused a {% term script %} or {% term automation %} to execute.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~17-~17: Possible missing comma found.
Context: ... %}. State objects also contain context data which can be used to identify the user ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~17-~17: Consider using “who” when you are referring to a person instead of an object.
Context: ... which can be used to identify the user that caused a {% term script %} or {% term a...

(THAT_WHO)


33-53: Standardize table formatting
Many table rows are missing trailing pipes and don’t adhere to the project’s pipe style. Please update all tables to use leading and trailing pipes, for example:

-| `trigger.platform` | Trigger object type.
+| `trigger.platform` | Trigger object type. |

You can run markdownlint --fix or manually add the trailing | on each row in the affected ranges.

Also applies to: 63-76, 82-87, 95-98, 106-106, 133-136, 162-169, 209-211, 236-236

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

33-33: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


34-34: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


35-35: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


36-36: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


44-44: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


45-45: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


46-46: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


46-46: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


47-47: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


48-48: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


49-49: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


50-50: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


51-51: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


52-52: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


52-52: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


53-53: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be3fbae and 161f1c1.

📒 Files selected for processing (1)
  • source/_docs/automation/templating.markdown (7 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_docs/automation/templating.markdown

[uncategorized] ~17-~17: Possible missing comma found.
Context: ... %}. State objects also contain context data which can be used to identify the user ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~17-~17: Consider using “who” when you are referring to a person instead of an object.
Context: ... which can be used to identify the user that caused a {% term script %} or {% term a...

(THAT_WHO)


[typographical] ~23-~23: Conjunctions like ‘or’ should not follow semicolons. Use a comma instead.
Context: ... location to specify a light to activate; or you could send a notification containin...

(CONJUNCTION_AFTER_SEMICOLON)


[uncategorized] ~135-~135: A punctuation mark might be missing here.
Context: ...tence-wildcards). Each detail contains:

  • name - name of the slot
  • text - ma...

    (AI_EN_LECTOR_MISSING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)
source/_docs/automation/templating.markdown

9-9: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


9-9: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


33-33: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


44-44: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


45-45: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


46-46: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


46-46: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


47-47: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


48-48: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


49-49: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


50-50: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


51-51: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


52-52: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


52-52: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


53-53: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


63-63: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


69-69: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


73-73: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


74-74: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


75-75: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


76-76: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


80-80: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


86-86: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


93-93: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


97-97: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


98-98: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


106-106: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


133-133: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


134-134: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


135-135: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


162-162: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


166-166: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


167-167: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


168-168: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


209-209: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


210-210: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


211-211: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


236-236: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

🪛 GitHub Actions: home-assistant.io Test
source/_docs/automation/templating.markdown

[error] 91-91: Textlint: This is a commonly misspelled word. Correct it to recommended (common-misspellings). Run 'textlint --fix' to fix.

⏰ 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 (8)
source/_docs/automation/templating.markdown (8)

2-3: Metadata update looks good
The new title and description more accurately reflect the focus on trigger variables and adhere to Home Assistant docs conventions.


6-6: Introduction clarified appropriately
The expanded introduction clearly explains that automations support advanced templating and outlines the available variables.


21-21: trigger variable description is clear
The updated explanation of trigger.platform correctly emphasizes the property’s purpose and format.


25-25: Link to trigger-specific data clarified
This sentence succinctly informs readers that each platform adds its own data fields.


29-29: All-triggers section succinct
“Triggers from all platforms will include the following properties.” is clear and needs no change.


78-81: Geolocation section update is good
The new Geolocation trigger example and description are accurate and consistent with other sections.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

80-80: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


89-89: Home Assistant header aligns with style
Using “### Home Assistant” matches the pattern of other trigger sections.


93-93: Home Assistant properties intro is clear
“This … are the properties available for a [Home Assistant trigger]” reads well.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

93-93: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

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: 2

🔭 Outside diff range comments (1)
source/_docs/automation/templating.markdown (1)

31-53: 🛠️ Refactor suggestion

Fix table formatting: add trailing pipes and remove trailing spaces.
Multiple table rows (e.g., line 33) are missing the trailing | and have inconsistent spacing, causing MD055/MD009 markdownlint failures. Please update each table to use leading and trailing pipes uniformly and strip any trailing spaces. For example:

-| `trigger.platform` | Trigger object type.
+| `trigger.platform` | Trigger object type |

Apply similar fixes to all trigger tables.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

33-33: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


34-34: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


35-35: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


36-36: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


44-44: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


45-45: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


46-46: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


46-46: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


47-47: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


48-48: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


49-49: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


50-50: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


51-51: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


52-52: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


52-52: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


53-53: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

♻️ Duplicate comments (1)
source/_docs/automation/templating.markdown (1)

67-69: Event trigger description is inaccurate.
This describes entity state changes but an Event trigger fires on any matching event. Please update to:

-An [Event](/docs/configuration/events/) trigger is fired each time an {% term entity %} state changes.
+An [Event](/docs/configuration/events/) trigger fires whenever an event matching the configured `event_type` occurs.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

69-69: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

🧹 Nitpick comments (3)
source/_docs/automation/templating.markdown (3)

8-12: Add blank lines around the fenced code block.
To satisfy markdownlint MD031 and improve readability, insert a blank line before and after the jinja code fence:

 Example of variables used in templates:

+ 
 ```jinja
  {{ this.name }} is the name of the automation executing from this trigger
  {{ trigger.platform }} is the type of trigger object, like `calendar`

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

9-9: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

</details>

</details>

---

`16-17`: **Use “who” instead of “that” when referring to a person.**  
In line 17, consider:
```diff
-State objects also contain context data which can be used to identify the user that caused a {% term script %} or {% term automation %} to execute.
+State objects also contain context data which can be used to identify the user who caused a {% term script %} or {% term automation %} to execute.
🧰 Tools
🪛 LanguageTool

[style] ~17-~17: Consider using “who” when you are referring to a person instead of an object.
Context: ... which can be used to identify the user that caused a {% term script %} or {% term a...

(THAT_WHO)


91-94: Remove trailing space and refine wording.
Line 93 has a trailing space. Also, consider simplifying to:

-The Home Assistant trigger is recommended for automations instead of [homeassistant_start or homeassistant_stop events](/docs/configuration/events/#homeassistant_start-homeassistant_started).
+Use the Home Assistant trigger for startups and shutdowns instead of the `homeassistant_start` or `homeassistant_stop` events.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

93-93: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 161f1c1 and aa96186.

📒 Files selected for processing (1)
  • source/_docs/automation/templating.markdown (7 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_docs/automation/templating.markdown

[style] ~17-~17: Consider using “who” when you are referring to a person instead of an object.
Context: ... which can be used to identify the user that caused a {% term script %} or {% term a...

(THAT_WHO)


[typographical] ~23-~23: Conjunctions like ‘or’ should not follow semicolons. Use a comma instead.
Context: ... location to specify a light to activate; or you could send a notification containin...

(CONJUNCTION_AFTER_SEMICOLON)


[uncategorized] ~135-~135: A punctuation mark might be missing here.
Context: ...tence-wildcards). Each detail contains:

  • name - name of the slot
  • text - ma...

    (AI_EN_LECTOR_MISSING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)
source/_docs/automation/templating.markdown

9-9: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


33-33: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


44-44: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


45-45: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


46-46: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


46-46: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


47-47: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


48-48: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


49-49: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


50-50: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


51-51: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


52-52: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


52-52: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


53-53: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


63-63: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


69-69: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


73-73: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


74-74: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


75-75: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


76-76: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


80-80: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


86-86: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


93-93: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


97-97: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


98-98: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


106-106: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


133-133: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


134-134: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


135-135: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


162-162: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


166-166: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


167-167: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


168-168: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


209-209: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


210-210: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


211-211: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


236-236: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

⏰ 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/automation/templating.markdown (6)

2-3: Title and description updates look good.
The new title and description accurately reflect the scope of this page.


6-6: Introduction clarified well.
The expanded introduction correctly positions templating as an advanced feature and introduces the trigger and this variables.


14-14: Section header rename approved.
Renaming "Available this data" to "Available state data" adds clarity.


21-21: Trigger variable description is clear.
The explanation for the trigger object and its platform property is accurate.


25-25: Good improvement.
The note about per-platform additional data is concise and helpful.


78-88: Verify geolocation trigger platform name.
The heading uses “Geolocation” but the table lists geo_location. Please confirm the correct platform identifier (geolocation vs. geo_location) to maintain consistency.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

80-80: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


86-86: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

clarify when event trigger fires
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: 8

🔭 Outside diff range comments (1)
source/_docs/automation/templating.markdown (1)

232-236: ⚠️ Potential issue

Fix Zone trigger table formatting.
Ensure all rows end with a pipe (MD055):

- | `trigger.platform` | Hardcoded: `zone`
- | `trigger.entity_id` | Entity ID that we are observing.
- | `trigger.from_state` | Previous [state object] of the entity.
- | `trigger.zone` | State object of the zone.
+ | `trigger.platform` | Hardcoded: `zone` |
+ | `trigger.entity_id` | Entity ID that we are observing. |
+ | `trigger.from_state` | Previous [state object] of the entity. |
+ | `trigger.zone` | State object of the zone. |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

232-232: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


233-233: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


234-234: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


235-235: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


236-236: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

♻️ Duplicate comments (2)
source/_docs/automation/templating.markdown (2)

95-98: ⚠️ Potential issue

Fix Home Assistant trigger table formatting.
Add trailing pipes (MD055):

- | `trigger.platform` | Hardcoded: `homeassistant`
- | `trigger.event` | The trigger event type, either `start`  or `shutdown`.
+ | `trigger.platform` | Hardcoded: `homeassistant` |
+ | `trigger.event` | The trigger event type, either `start` or `shutdown`. |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

97-97: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


98-98: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


73-76: ⚠️ Potential issue

Fix Event trigger table formatting.
Ensure all rows have trailing pipes (MD055):

- | `trigger.platform` | Hardcoded: `event`
- | `trigger.event` | Event object that matched.
- | `trigger.event.event_type` | Event type.
- | `trigger.event.data` | Optional event data.
+ | `trigger.platform` | Hardcoded: `event` |
+ | `trigger.event` | Event object that matched. |
+ | `trigger.event.event_type` | Event type. |
+ | `trigger.event.data` | Optional event data. |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

73-73: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


74-74: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


75-75: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


76-76: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

🧹 Nitpick comments (2)
source/_docs/automation/templating.markdown (2)

16-17: Refine wording and punctuation in state data description.
Add a missing comma and use "who" for clarity:

- State objects also contain context data which can be used to identify the user that caused a {% term script %} or {% term automation %} to execute.
+ State objects also contain context data, which can be used to identify the user who caused a {% term script %} or {% term automation %} to execute.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~17-~17: Possible missing comma found.
Context: ... %}. State objects also contain context data which can be used to identify the user ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~17-~17: Consider using “who” when you are referring to a person instead of an object.
Context: ... which can be used to identify the user that caused a {% term script %} or {% term a...

(THAT_WHO)


23-23: Replace semicolon with comma for conjunction.
Avoid conjunctions immediately after semicolons; use a comma instead:

- specify a light to activate; or you could send a notification containing the friendly name of the sensor that triggered it.
+ specify a light to activate, or you could send a notification containing the friendly name of the sensor that triggered it.
🧰 Tools
🪛 LanguageTool

[typographical] ~23-~23: Conjunctions like ‘or’ should not follow semicolons. Use a comma instead.
Context: ... location to specify a light to activate; or you could send a notification containin...

(CONJUNCTION_AFTER_SEMICOLON)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa96186 and e44b62e.

📒 Files selected for processing (1)
  • source/_docs/automation/templating.markdown (7 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_docs/automation/templating.markdown

[uncategorized] ~17-~17: Possible missing comma found.
Context: ... %}. State objects also contain context data which can be used to identify the user ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~17-~17: Consider using “who” when you are referring to a person instead of an object.
Context: ... which can be used to identify the user that caused a {% term script %} or {% term a...

(THAT_WHO)


[typographical] ~23-~23: Conjunctions like ‘or’ should not follow semicolons. Use a comma instead.
Context: ... location to specify a light to activate; or you could send a notification containin...

(CONJUNCTION_AFTER_SEMICOLON)


[uncategorized] ~135-~135: A punctuation mark might be missing here.
Context: ...tence-wildcards). Each detail contains:

  • name - name of the slot
  • text - ma...

    (AI_EN_LECTOR_MISSING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)
source/_docs/automation/templating.markdown

9-9: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


33-33: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


44-44: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


45-45: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


46-46: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


46-46: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


47-47: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


48-48: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


49-49: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


50-50: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


51-51: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


52-52: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


52-52: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


53-53: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


63-63: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


69-69: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


73-73: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


74-74: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


75-75: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


76-76: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


80-80: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


86-86: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


93-93: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


97-97: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


98-98: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


106-106: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


133-133: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


134-134: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


135-135: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


162-162: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


166-166: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


167-167: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


168-168: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


209-209: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


210-210: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


211-211: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


236-236: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

⏰ 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 (4)
source/_docs/automation/templating.markdown (4)

2-3: Front matter checks out.
Title and description are clear and correctly formatted.


6-6: Introduction is clear and concise.
The description effectively introduces advanced templating features in automations.


25-25: Platform-specific data sentence is clear.
No changes needed here.


67-67: Event trigger description is comprehensive.
Covers both state changes and generic events—no update needed here.

MarkusBiggus and others added 2 commits May 10, 2025 11:51
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 5

♻️ Duplicate comments (7)
source/_docs/automation/templating.markdown (7)

166-168: ⚠️ Potential issue

Fix Tag table formatting
Add trailing pipes to each row in the Tag trigger table.

Apply this diff:

-| `trigger.platform`  | Hardcoded: `tag`
-| `trigger.tag_id`    | The tag ID captured.
-| `trigger.device_id` | Optional device ID that captured the tag.
+| `trigger.platform`  | Hardcoded: `tag` |
+| `trigger.tag_id`    | The tag ID captured. |
+| `trigger.device_id` | Optional device ID that captured the tag. |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

166-166: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


167-167: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


168-168: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


33-36: ⚠️ Potential issue

Add missing trailing table pipes
Markdownlint MD055 requires both leading and trailing pipes for table rows. Add | at the end of each row in the “All” table.

Apply this diff:

-| `trigger.platform` | Trigger object type.
-| `trigger.alias`    | Alias of the trigger.
-| `trigger.id`       | The [`id` of the trigger](/docs/automation/trigger/#trigger-id).
-| `trigger.idx`      | Index of the trigger. (The first trigger idx is `0`.)
+| `trigger.platform` | Trigger object type. |
+| `trigger.alias`    | Alias of the trigger. |
+| `trigger.id`       | The [`id` of the trigger](/docs/automation/trigger/#trigger-id). |
+| `trigger.idx`      | Index of the trigger. (The first trigger idx is `0`.) |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

33-33: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


34-34: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


35-35: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


36-36: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


104-106: ⚠️ Potential issue

Fix MQTT table formatting
Add a trailing pipe to the MQTT trigger table header row.

Apply this diff:

-| `trigger.platform` | Hardcoded: `mqtt`
+| `trigger.platform` | Hardcoded: `mqtt` |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

106-106: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


61-63: ⚠️ Potential issue

Add trailing pipe to Device table row
The single row in the Device trigger table needs a trailing |.

Apply this diff:

-| `trigger.platform` | Hardcoded: `device`
+| `trigger.platform` | Hardcoded: `device` |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

63-63: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


84-87: ⚠️ Potential issue

Fix Geolocation table formatting
Add trailing pipes and remove extra spaces to satisfy Markdown lint rules.

Apply this diff:

-| `trigger.platform` | Hardcoded: `geo_location`
-| `trigger.event`    | The trigger event type, either `enter`  or `leave`.
-| `trigger.source`   | The Geolocation platform creating the trigger event.
-| `trigger.zone`     | State object of the zone.
+| `trigger.platform` | Hardcoded: `geo_location` |
+| `trigger.event`    | The trigger event type, either `enter` or `leave`. |
+| `trigger.source`   | The Geolocation platform creating the trigger event. |
+| `trigger.zone`     | State object of the zone. |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

84-84: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


86-86: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


133-135: ⚠️ Potential issue

Fix Sentence table formatting and missing punctuation
Add trailing pipes to each row and end the final description with a period.

Apply this diff:

-| `trigger.sentence` | Text of the sentence that was matched.
-| `trigger.slots`    | Object with matched slot values.
-| `trigger.details`  | Object with matched slot details by name, such as [wildcards](/docs/automation/trigger/#sentence-wildcards). Each detail contains: <ul><li>`name` - name of the slot</li><li>`text` - matched text</li><li>`value` - output value (see [lists](/docs/voice/intent-recognition/template-sentence-syntax/#lists))</li></ul>
+| `trigger.sentence` | Text of the sentence that was matched. |
+| `trigger.slots`    | Object with matched slot values. |
+| `trigger.details`  | Object with matched slot details by name, such as [wildcards](/docs/automation/trigger/#sentence-wildcards). Each detail contains: <ul><li>`name` - name of the slot</li><li>`text` - matched text</li><li>`value` - output value (see [lists](/docs/voice/intent-recognition/template-sentence-syntax/#lists))</li></ul>. |
🧰 Tools
🪛 LanguageTool

[uncategorized] ~135-~135: A punctuation mark might be missing here.
Context: ...tence-wildcards). Each detail contains:

  • name - name of the slot
  • text - ma...

    (AI_EN_LECTOR_MISSING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)

133-133: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


134-134: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


135-135: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


44-53: ⚠️ Potential issue

Fix Calendar table formatting
Rows in the Calendar trigger table need trailing pipes, and trailing spaces should be removed to satisfy MD055 and MD009.

Apply this diff:

-| `trigger.platform`                   | Hardcoded: `calendar`
-| `trigger.event`                      | The trigger event type, either `start`  or `end`.
-| `trigger.calendar_event`             | The calendar event object matched. 
-| `trigger.calendar_event.summary`     | The title or summary of the calendar event.
-| `trigger.calendar_event.start`       | String representation of the start date or date time of the calendar event e.g. `2022-04-10`, or `2022-04-10 11:30:00-07:00`
-| `trigger.calendar_event.end`         | String representation of the end time of date time the calendar event in UTC  e.g. `2022-04-11`, or `2022-04-10 11:45:00-07:00`
-| `trigger.calendar_event.all_day`     | Indicates the event spans the entire day.
-| `trigger.calendar_event.description` | A detailed description of the calendar event, if available.
-| `trigger.calendar_event.location`    | Location information for the calendar event, if available. 
-| `trigger.offset`                     | Timedelta object with offset to the event, if any.
+| `trigger.platform`                   | Hardcoded: `calendar` |
+| `trigger.event`                      | The trigger event type, either `start` or `end`. |
+| `trigger.calendar_event`             | The calendar event object matched. |
+| `trigger.calendar_event.summary`     | The title or summary of the calendar event. |
+| `trigger.calendar_event.start`       | String representation of the start date or date time of the calendar event (e.g., `2022-04-10` or `2022-04-10 11:30:00-07:00`). |
+| `trigger.calendar_event.end`         | String representation of the end time of the calendar event in UTC (e.g., `2022-04-11` or `2022-04-10 11:45:00-07:00`). |
+| `trigger.calendar_event.all_day`     | Indicates the event spans the entire day. |
+| `trigger.calendar_event.description` | A detailed description of the calendar event, if available. |
+| `trigger.calendar_event.location`    | Location information for the calendar event, if available. |
+| `trigger.offset`                     | Timedelta object with offset to the event, if any. |
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

44-44: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


45-45: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


46-46: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


46-46: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


47-47: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


48-48: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


49-49: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


50-50: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


51-51: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


52-52: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


52-52: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


53-53: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

🧹 Nitpick comments (2)
source/_docs/automation/templating.markdown (2)

16-17: Improve comma usage and pronoun clarity
Add a comma before “which” and use “who” when referring to a person for better readability and correctness.

Apply this diff:

- State objects also contain context data which can be used to identify the user that caused a {% term script %} or {% term automation %} to execute. Note that `this` will not change while executing the {% term actions %}.
+ State objects also contain context data, which can be used to identify the user who caused a {% term script %} or {% term automation %} to execute. Note that `this` will not change while executing the {% term actions %}.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~17-~17: Possible missing comma found.
Context: ... %}. State objects also contain context data which can be used to identify the user ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~17-~17: Consider using “who” when you are referring to a person instead of an object.
Context: ... which can be used to identify the user that caused a {% term script %} or {% term a...

(THAT_WHO)


21-23: Replace semicolon with comma
Avoid using a semicolon before “or” for correct punctuation. This improves readability.

Apply this diff:

- you could specify a light to activate; or you could send a notification containing the friendly name of the sensor that triggered it.
+ you could specify a light to activate, or you could send a notification containing the friendly name of the sensor that triggered it.
🧰 Tools
🪛 LanguageTool

[typographical] ~23-~23: Conjunctions like ‘or’ should not follow semicolons. Use a comma instead.
Context: ... location to specify a light to activate; or you could send a notification containin...

(CONJUNCTION_AFTER_SEMICOLON)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e44b62e and 45543f1.

📒 Files selected for processing (1)
  • source/_docs/automation/templating.markdown (7 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_docs/automation/templating.markdown

[uncategorized] ~17-~17: Possible missing comma found.
Context: ... %}. State objects also contain context data which can be used to identify the user ...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~17-~17: Consider using “who” when you are referring to a person instead of an object.
Context: ... which can be used to identify the user that caused a {% term script %} or {% term a...

(THAT_WHO)


[typographical] ~23-~23: Conjunctions like ‘or’ should not follow semicolons. Use a comma instead.
Context: ... location to specify a light to activate; or you could send a notification containin...

(CONJUNCTION_AFTER_SEMICOLON)


[uncategorized] ~135-~135: A punctuation mark might be missing here.
Context: ...tence-wildcards). Each detail contains:

  • name - name of the slot
  • text - ma...

    (AI_EN_LECTOR_MISSING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)
source/_docs/automation/templating.markdown

9-9: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


33-33: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


44-44: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


45-45: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


46-46: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


46-46: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


47-47: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


48-48: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


49-49: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


50-50: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


51-51: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


52-52: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


52-52: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


53-53: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


63-63: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


69-69: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


80-80: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


84-84: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


85-85: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


86-86: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


87-87: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


93-93: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


97-97: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


98-98: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


106-106: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


133-133: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


134-134: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


135-135: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


162-162: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


166-166: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


167-167: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


168-168: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


209-209: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


210-210: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


211-211: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)


236-236: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe

(MD055, table-pipe-style)

🔇 Additional comments (3)
source/_docs/automation/templating.markdown (3)

2-3: Approve updated title and description
The new title and description clearly emphasize the purpose of the page and align with project standards.


6-6: Approve expanded introduction
The revised introduction correctly highlights advanced templating support in automations.


25-25: Approve trigger platforms introduction
The sentence correctly introduces additional trigger-specific data.

MarkusBiggus and others added 2 commits May 10, 2025 11:56
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor Author

@MarkusBiggus MarkusBiggus left a comment

Choose a reason for hiding this comment

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

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
current This PR goes into the current branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant