Skip to content
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

Improve schedule documentation #37104

Merged
merged 13 commits into from
Feb 19, 2025

Conversation

rikroe
Copy link
Contributor

@rikroe rikroe commented Jan 24, 2025

Proposed change

Improve schedule documentation by removing doubled YAML and updating to include latest UI changes (additional data editable via UI).

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
    • Enhanced schedule integration documentation with a restructured introduction.
    • Clarified configuration details for schedule entities, including new entries for Name, Icon, Schedule blocks, Start, End, and Additional data.
    • Improved instructions for creating schedules through a streamlined process.
    • Updated YAML configuration guidance emphasizing manual setup and example configurations.
    • Revised automation examples to align with new naming conventions and functionality.

@rikroe rikroe requested a review from a team as a code owner January 24, 2025 21:16
@home-assistant home-assistant bot added the current This PR goes into the current branch label Jan 24, 2025
Copy link

netlify bot commented Jan 24, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 6dc4aac
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/67b096d85105870008902f3c
😎 Deploy Preview https://deploy-preview-37104--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 Jan 24, 2025

📝 Walkthrough

Walkthrough

The pull request updates the documentation for the Home Assistant Schedule integration, focusing on improving content clarity and structure. The changes enhance the explanation of configuration options, including new entries for Name, Icon, and Schedule blocks. The documentation now provides more detailed guidance on setting up schedules, with a clearer emphasis on YAML configuration and a more explicit description of schedule block attributes and additional data.

Changes

File Change Summary
source/_integrations/schedule.markdown - Added new configuration entries: Name, Icon, Schedule blocks, Start, End, Additional data
- Updated configuration to make days of the week required
- Restructured YAML configuration explanation
- Improved clarity of schedule block definitions

Sequence Diagram

sequenceDiagram
    participant User
    participant HomeAssistant
    participant ScheduleIntegration

    User->>HomeAssistant: Configure Schedule
    HomeAssistant->>ScheduleIntegration: Define Schedule Blocks
    ScheduleIntegration-->>HomeAssistant: Validate Configuration
    HomeAssistant-->>User: Apply Schedule Settings
Loading

The sequence diagram illustrates the basic flow of configuring a schedule in Home Assistant, showing how users define schedule blocks through the integration, which are then validated and applied by the system.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.

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. (Beta)
  • @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: 1

🧹 Nitpick comments (4)
source/_integrations/schedule.markdown (4)

17-17: Fix grammatical error in button reference.

Remove the article "the" before "My button" as it's part of the button name.

-To add a schedule to your Home Assistant Instance, use the My button below.
+To add a schedule to your Home Assistant Instance, use My button below.
🧰 Tools
🪛 LanguageTool

[grammar] ~17-~17: Possible typo. Did you mean “the” or “My”?
Context: ...le to your Home Assistant Instance, use the My button below. {% include integrations/...

(DT_PRP)


49-51: Consider adding an inline example for Additional data mapping.

While the concept is explained well, adding a simple inline example would make it immediately clear to users.

 The **Additional data** entry of each block should be a mapping of attribute names to values.
 For example, the schedule helper entity could have `brightness` and `color_temp` attributes when the blocks are active.
+For instance:
+```yaml
+Additional data:
+  brightness: 100
+  color_temp: 4000
+```

57-57: Improve clarity of the Additional data explanation.

The sentence about additional data could be more explicit.

-Additional data can be added as `data` block mapping for each schedule block.
+Additional data can be added using the `data` block for each schedule block, as shown in the example below:

129-129: Remove unnecessary comma in attributes description.

For better readability, remove the comma before "when".

-| Additional data | The entries in **Additional data** / `data` of a schedule block, when the respective block is active. |
+| Additional data | The entries in **Additional data** / `data` of a schedule block when the respective block is active. |
🧰 Tools
🪛 LanguageTool

[typographical] ~129-~129: Usually, there’s no comma before “when”.
Context: ...onal data** / data of a schedule block, when the respective block is active. | ## A...

(IF_NO_COMMA)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 933f7cc and 73d991c.

📒 Files selected for processing (1)
  • source/_integrations/schedule.markdown (2 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/schedule.markdown

[grammar] ~17-~17: Possible typo. Did you mean “the” or “My”?
Context: ...le to your Home Assistant Instance, use the My button below. {% include integrations/...

(DT_PRP)


[typographical] ~129-~129: Usually, there’s no comma before “when”.
Context: ...onal data** / data of a schedule block, when the respective block is active. | ## A...

(IF_NO_COMMA)

🔇 Additional comments (1)
source/_integrations/schedule.markdown (1)

15-15: Documentation structure and clarity improvements look great!

The enhanced documentation structure with clear sections for UI configuration, YAML setup, and automation examples makes it easier for users to understand and implement schedules. The addition of detailed configuration options and explicit descriptions for each component is particularly helpful.

Also applies to: 21-47

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

♻️ Duplicate comments (1)
source/_integrations/schedule.markdown (1)

153-153: ⚠️ Potential issue

Fix syntax error in automation example.

There's a missing closing quote in the template expression for kelvin.

-        kelvin: "{{ state_attr('schedule.light_schedule, 'temperature') }}"
+        kelvin: "{{ state_attr('schedule.light_schedule', 'temperature') }}"
🧹 Nitpick comments (2)
source/_integrations/schedule.markdown (2)

30-30: Fix grammatical issues.

There are several grammatical issues that need to be addressed:

-After you have created schedule blocks, you can use a **single left click** on a block to open an edit view for a this time block.
+After you have created schedule blocks, you can use a **single left click** on a block to open an edit view for this time block.

-The **Additional data** entry of each block should be a mapping of attribute names to values. For example, a block with the the following data will show `brightness` and `color_temp` as {% term entity %} attributes when the blocks is active:
+The **Additional data** entry of each block should be a mapping of attribute names to values. For example, a block with the following data will show `brightness` and `color_temp` as {% term entity %} attributes when the block is active:

Also applies to: 47-48

🧰 Tools
🪛 LanguageTool

[grammar] ~30-~30: Two determiners in a row. Choose either “a” or “this”.
Context: ...k** on a block to open an edit view for a this time block. {% configuration_basic %}...

(DT_DT)


136-136: Remove trailing whitespace.

There's a trailing whitespace at the end of this line.

-A schedule creates an on/off (schedule) sensor within the times set. 
+A schedule creates an on/off (schedule) sensor within the times set.
🧰 Tools
🪛 Markdownlint (0.37.0)

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

(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 73d991c and 89f154d.

📒 Files selected for processing (1)
  • source/_integrations/schedule.markdown (3 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/schedule.markdown

[grammar] ~30-~30: Two determiners in a row. Choose either “a” or “this”.
Context: ...k** on a block to open an edit view for a this time block. {% configuration_basic %}...

(DT_DT)


[duplication] ~48-~48: Possible typo: you repeated a word.
Context: ...es to values. For example, a block with the the following data will show brightness a...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~48-~48: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...s {% term entity %} attributes when the blocks is active: ```yaml brightness: 100 col...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)


[grammar] ~48-~48: “blocks” is a plural noun. It appears that the verb form is incorrect.
Context: ...rm entity %} attributes when the blocks is active: ```yaml brightness: 100 color_...

(PCT_PLURAL_NOUN_SINGULAR_VERB_AGREEMENT)

🪛 Markdownlint (0.37.0)
source/_integrations/schedule.markdown

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

(MD009, no-trailing-spaces)

⏰ 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 (2)
source/_integrations/schedule.markdown (2)

15-28: LGTM! Clear and well-structured introduction.

The introduction and basic configuration section effectively explains the Schedule integration's purpose and setup process.


Line range hint 55-124: LGTM! Comprehensive YAML configuration documentation.

The YAML configuration section provides clear examples and a complete configuration schema.

🧰 Tools
🪛 LanguageTool

[grammar] ~30-~30: Two determiners in a row. Choose either “a” or “this”.
Context: ...k** on a block to open an edit view for a this time block. {% configuration_basic %}...

(DT_DT)


[duplication] ~48-~48: Possible typo: you repeated a word.
Context: ...es to values. For example, a block with the the following data will show brightness a...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~48-~48: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...s {% term entity %} attributes when the blocks is active: ```yaml brightness: 100 col...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)


[grammar] ~48-~48: “blocks” is a plural noun. It appears that the verb form is incorrect.
Context: ...rm entity %} attributes when the blocks is active: ```yaml brightness: 100 color_...

(PCT_PLURAL_NOUN_SINGULAR_VERB_AGREEMENT)

Copy link
Contributor

@silamon silamon left a comment

Choose a reason for hiding this comment

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

I've went through your pull request and made some comments.

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/_integrations/schedule.markdown (5)

19-28: Enhanced Configuration Block for Core Parameters

The new configuration block for Name, Icon, and Schedule blocks offers clear, user-friendly directives.
Note: There is a trailing space on line 21 that should be removed to comply with markdownlint (MD009).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)


32-45: Detailed Timing and Additional Data Configuration

This block clearly specifies required fields for "Start" and "End" times and provides an optional mapping for "Additional data."
Recommendation: Consider clarifying the expected time format (e.g., HH:MM or HH:MM:SS) to avoid ambiguity.


47-47: Clarification on Additional Data Mapping

Reiterating that additional data should be a mapping reinforces its intended structure.
Optional: Verify if this repetition is intentional or if a cross-reference to the description in the configuration block would suffice.


125-133: Clear and Concise Attributes Documentation

The attributes section succinctly outlines how a schedule entity exports its attributes, including the additional data mapping.
Optional: Consider elaborating slightly more on the "Additional data" attribute to match the detail provided elsewhere in the documentation.


134-154: Updated Automation Example for Schedule Activation

The first automation example accurately shows how to trigger actions (e.g., light turning on) when the schedule activates. The templating for brightness_pct and kelvin (correctly referencing temperature) is implemented well.
Optional: Adding a brief explanatory note before the code block could further improve clarity for users.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 89f154d and 759b702.

📒 Files selected for processing (1)
  • source/_integrations/schedule.markdown (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/schedule.markdown

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

(MD009, no-trailing-spaces)

🔇 Additional comments (5)
source/_integrations/schedule.markdown (5)

15-15: Clear and Concise Schedule Introduction

The updated introduction effectively defines the schedule's functionality and how time blocks activate and deactivate.


30-30: Precise Editing Instruction Added

The added line clearly instructs users that after creating schedule blocks, they can press a block to edit its details.


51-52: Effective YAML Example for Additional Data

The YAML snippet clearly demonstrates how to specify attributes like brightness and color_temp.


55-60: Improved Guidance for YAML Configuration

The revised section provides clear instructions for manual YAML-based setup and mentions the use of a data block for each schedule block.


156-173: Clear Automation Example for Schedule Deactivation

The second automation example effectively demonstrates how to trigger actions when the schedule turns off.

@rikroe
Copy link
Contributor Author

rikroe commented Feb 3, 2025

Thanks for the review! Added most of your suggestions directly, please double check if the remaining review points are formulated better now.

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)
source/_integrations/schedule.markdown (1)

21-21: Remove Trailing Whitespace.
There is a trailing space at the end of the description on line 21. Removing this extra space will comply with markdown lint rules (MD009).

-  description: Friendly name of the schedule. 
+  description: Friendly name of the schedule.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

21-21: 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 759b702 and a293099.

📒 Files selected for processing (1)
  • source/_integrations/schedule.markdown (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/schedule.markdown

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

(MD009, no-trailing-spaces)

🔇 Additional comments (11)
source/_integrations/schedule.markdown (11)

15-15: Clear and Informative Introduction.
The new introductory paragraph on line 15 effectively explains what the Schedule integration is and how it functions, setting a clear context for the reader.


19-28: Well-Structured Basic Configuration Block.
The configuration block for the basic settings (Name, Icon, and Schedule blocks) is clear and easy to follow. The descriptions provide sufficient guidance for setting up the schedule through the UI.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

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

(MD009, no-trailing-spaces)


30-30: Concise UI Instruction Addition.
The newly added instruction on line 30—informing users that they can press a schedule block to edit its details—is clear and enhances the documentation's usability.


32-45: Comprehensive Parameter Configuration.
This configuration block for "Start," "End," and "Additional data" clearly specifies the requirements and data types for each parameter. The descriptions help users understand how these fields affect the schedule's behavior.


47-48: Clear Explanation of Additional Data.
The explanation provided on lines 47–48 reinforces that the "Additional data" entry should be a mapping of attribute names to values, which is useful for conveying how the schedule affects entity attributes when active.


51-52: Effective YAML Example for Additional Data.
The YAML snippet on lines 51–52, demonstrating how to set attributes like brightness and color_temp, is simple and clear. It successfully shows users the expected format for additional data.


57-60: Enhanced YAML Configuration Instructions.
The updated instructions on lines 57–60, which explain how to manually configure the integration via YAML, are now more explicit and user-friendly. This alternate setup guidance will help users who prefer manual configuration.


131-131: Clarification of Exported Attributes.
The updated table entry on line 131 clearly details that the keys (e.g., key_1, key_2) are derived from the Additional data/data setting. This clarification improves the reader’s understanding of how schedule block data maps to entity attributes.


133-137: Improved Automation Example Introduction.
The revised introduction to the automation example (lines 133–137) succinctly explains the purpose of the schedule sensor in automations, helping users understand when and how the schedule activates the sensor.


142-152: Corrected Automation Example Syntax.
The first automation example now correctly utilizes the state_attr function with proper quoting in its YAML snippet, particularly for the "kelvin" attribute. This helps prevent syntax issues and ensures that the example is accurate.


161-171: Consistent Off-Automation Example.
The second automation example (lines 161–171) mirrors the structure and clarity of the first, effectively demonstrating how to turn off a light when the schedule becomes inactive.

@frenck
Copy link
Member

frenck commented Feb 6, 2025

I've marked this PR as a draft, as changes are requested that need to be processed.
Please un-draft it once it is ready for review again by clicking the "Ready for review" button.

Thanks! 👍

../Frenck

Learn more about our pull request process.

@frenck frenck marked this pull request as draft February 6, 2025 20:46
@rikroe rikroe marked this pull request as ready for review February 13, 2025 21:15
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: 1

🧹 Nitpick comments (4)
source/_integrations/schedule.markdown (4)

30-30: Improve transition between configuration sections.

The transition could be clearer about what "details" can be edited.

-After creating schedule blocks, you can press a block to edit the details.
+After creating schedule blocks, you can press a block to edit its start time, end time, and additional data.

49-54: Add context about the purpose of additional data attributes.

Consider explaining how these attributes can be used in automations (as shown in the later example).

-Adding the following as `Additional data` will show `brightness` and `color_temp` as {% term entity %} attributes when the block is active:
+Adding the following as `Additional data` will show `brightness` and `color_temp` as {% term entity %} attributes when the block is active. These attributes can then be used in automations to control your lights:

61-65: Consider moving the note about data field.

The note about the data field would be more relevant if placed after the YAML example, where readers can see the actual usage of the data field.

Consider moving this note block to after line 95, where the YAML example ends.


164-164: Remove trailing space.

There's a trailing space at the end of this line.

-Another automation can be added to turn the lights off once the schedule is inactive: 
+Another automation can be added to turn the lights off once the schedule is inactive:
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

164-164: 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 a293099 and 58e2d26.

📒 Files selected for processing (1)
  • source/_integrations/schedule.markdown (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/schedule.markdown

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

(MD009, no-trailing-spaces)

🔇 Additional comments (2)
source/_integrations/schedule.markdown (2)

15-15: LGTM! Clear and comprehensive introduction.

The introduction effectively explains the Schedule integration's purpose, components, and functionality.


131-138: LGTM! Clear documentation of attributes.

The attributes section effectively explains both the next_event and dynamic data attributes.

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

🧹 Nitpick comments (1)
source/_integrations/schedule.markdown (1)

164-180: Trailing Whitespace & Consistency Check for Automation:
The second automation example clearly outlines how to turn off the light. However, please remove any trailing whitespace (notably around line 164 as indicated by static analysis) to conform with markdown linting standards.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

164-164: 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 58e2d26 and 6dc4aac.

📒 Files selected for processing (1)
  • source/_integrations/schedule.markdown (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/schedule.markdown

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

(MD009, no-trailing-spaces)

⏰ 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 (12)
source/_integrations/schedule.markdown (12)

15-16: Introduction Clarity:
The new introductory paragraph clearly explains what the Schedule integration does and how it functions—emphasizing the activation and deactivation of time blocks. This sets a solid context for the rest of the documentation.


19-28: Configuration Layout for Basic Settings:
The configuration block using {% configuration_basic %} for the Name, Icon, and Schedule blocks is well-structured with clear descriptions. For even better readability, you might consider using a bullet list or indenting each entry consistently, but this is optional.


30-31: Editing Instructions:
The added note "After creating schedule blocks, you can press a block to edit the details." is concise and user-friendly, clearly guiding users on how to interact with the UI.


32-45: Time Fields Configuration:
This configuration block for Start, End, and Additional data is explicit and precise. The required flags and data types are well defined, which should help prevent user misconfigurations.


47-50: Additional Data Example:
The "Adding additional data" section, along with the YAML example, effectively demonstrates how the additional attributes (like brightness and color_temp) are applied when a schedule block is active. The example is clear and practical.


56-66: YAML Configuration Clarity:
The revised YAML configuration section provides a streamlined guide to manually setting up the integration via YAML. The note about the data field reaffirms its purpose and is a helpful addition.


68-95: Example Configuration Validation:
The comprehensive YAML example showcasing the schedule configuration is excellent. It covers multiple scenarios (different days with varying times and data) and adheres nicely to the new structure.


97-129: Configuration Schema Detail:
The configuration schema defined within the {% configuration %} block is detailed and robust. The inclusion of required fields, accurate types, and a default for the data mapping provides clear guidance for proper setup.


131-139: Attributes Table Clarity:
The attributes table clearly outlines the key state attributes of the schedule entity. For additional clarity, you might note that key_1, key_2, etc., are placeholders representing the dynamic keys from the Additional data.


140-144: Automation Example Introduction:
The preliminary explanation for the automation example is succinct and effectively conveys that the schedule sensor can trigger automations such as turning lights on.


145-162: Automation Action Parameter Consistency:
In the automation example, the kelvin parameter is assigned the value from the color_temp attribute. Please verify that this mapping aligns with the expected input for the target light service. If the service expects a parameter named color_temp, consider renaming it for consistency.


182-189: Actions Section Clarity:
The description for the schedule.reload action is clear and informative, effectively communicating its purpose for reloading the schedule configuration without needing a full restart.

@silamon silamon merged commit cec6d7c into home-assistant:current Feb 19, 2025
7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 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.

3 participants