-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add modern configuration for template light and switch #38332
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
Add modern configuration for template light and switch #38332
Conversation
It seems that this PR is targeted against an incorrect branch since it has a parent PR on one of our codebases. Documentation that needs to be updated for an upcoming release should target the |
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
📝 WalkthroughWalkthroughThe pull request updates the documentation in Changes
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 (2)
source/_integrations/template.markdown (2)
57-60
: Legacy Types Section Update & Markdown Spacing.
The addition of legacy references for Light and Switch is a helpful inclusion for users familiar with older configurations. To adhere to markdownlint guidelines (MD032), please ensure that the list items are surrounded by blank lines for improved readability.🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
58-58: Lists should be surrounded by blank lines
null(MD032, blanks-around-lists)
312-412
: Review of Light Entity Configuration Documentation.
This section provides a comprehensive schema for defining light entities with various attributes (state, brightness, color temperature, color configurations, etc.) and actions. A few points for consideration:
- Typo Correction: In the description for
set_level
(line 386), the phrase “only ha brightness” appears to be a typo. It should read “only has brightness.”- Default Value Consistency: The default value
"optimistic"
is used repeatedly. Please verify that this aligns well with the integration’s behavior and is documented consistently across the platform.- Schema Validation: The use of
required: inclusive
for keys such aseffect_list
andeffect
should be double-checked to confirm that it is the intended marker for conditional requirement (if that’s the case as per schema definitions).Proposed diff for the typo correction:
- description: Defines an action to run when the light is given a brightness command. The script will only be called if the `turn_on` call only ha brightness, and optionally transition. Receives variables `brightness` and, optionally, `transition`. + description: Defines an action to run when the light is given a brightness command. The script will only be called if the `turn_on` call only has brightness, and optionally transition. Receives variables `brightness` and, optionally, `transition`.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
source/_integrations/template.markdown
(5 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
source/_integrations/template.markdown
58-58: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)
🔇 Additional comments (2)
source/_integrations/template.markdown (2)
16-18
: Add New Code Owner Entry.
The code owner@Petro31
has been correctly added to theha_codeowners
section to ensure that documentation changes are properly reviewed and maintained.
413-430
: Review of Switch Entity Configuration Documentation.
The configuration forswitch
entities mirrors other similar sections and is clearly defined. Ensure that the default value"optimistic"
specified for thestate
field is valid and consistent with how the switch integration interprets this value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Petro31 👍
../Frenck
Proposed change
Update documents to reflect changes in home-assistant/core#140326 and home-assistant/core#140324
Because this is late for beta, Frenck requested this PR to be merged against current not next.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit
New Features
Documentation