Refactor threshold trigger and condition docs into shared includes#45719
Refactor threshold trigger and condition docs into shared includes#45719abmantis wants to merge 2 commits into
Conversation
|
It seems that this PR is targeted against an incorrect branch. Documentation updates which apply to our current stable release should target the |
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the “threshold” family of trigger and condition documentation by extracting duplicated UI/YAML explanation blocks into shared includes, and then applying those includes to the temperature and humidity trigger/condition pages.
Changes:
- Introduces reusable include partials for “crossed threshold” and “changed” triggers (UI steps + UI options + YAML options).
- Introduces reusable include partials for “threshold value” conditions (UI steps + UI options + YAML options).
- Updates the temperature and humidity trigger/condition pages to use the new shared includes.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| source/_triggers/temperature.crossed_threshold.markdown | Replaces duplicated UI/YAML option text with shared “crossed threshold” includes (temperature variant). |
| source/_triggers/temperature.changed.markdown | Replaces duplicated UI/YAML option text with shared “changed” includes (temperature variant). |
| source/_triggers/humidity.crossed_threshold.markdown | Replaces duplicated UI/YAML option text with shared “crossed threshold” includes (unitless/humidity variant). |
| source/_triggers/humidity.changed.markdown | Replaces duplicated UI/YAML option text with shared “changed” includes (unitless/humidity variant). |
| source/_conditions/temperature.is_value.markdown | Replaces duplicated UI/YAML option text with shared “threshold value” condition includes (temperature variant). |
| source/_conditions/humidity.is_value.markdown | Replaces duplicated UI/YAML option text with shared “threshold value” condition includes (unitless/humidity variant). |
| source/_includes/triggers/threshold_crossed_steps.md | New shared UI step list for “crossed threshold” triggers. |
| source/_includes/triggers/threshold_crossed_options_ui.md | New shared UI options block for “crossed threshold” triggers. |
| source/_includes/triggers/threshold_crossed_options_yaml.md | New shared YAML options block for “crossed threshold” triggers. |
| source/_includes/triggers/threshold_changed_steps.md | New shared UI step list for “changed” triggers. |
| source/_includes/triggers/threshold_changed_options_ui.md | New shared UI options block for “changed” triggers. |
| source/_includes/triggers/threshold_changed_options_yaml.md | New shared YAML options block for “changed” triggers. |
| source/_includes/conditions/threshold_value_steps.md | New shared UI step list for “threshold value” conditions. |
| source/_includes/conditions/threshold_value_options_ui.md | New shared UI options block for “threshold value” conditions. |
| source/_includes/conditions/threshold_value_options_yaml.md | New shared YAML options block for “threshold value” conditions. |
c0ffeeca7
left a comment
There was a problem hiding this comment.
Love it! ❤️ Added a question.
|
@c0ffeeca7 I've replaced the temperature-specific stuff with variables so it each trigger can have the proper descriptions and units. |
c0ffeeca7
left a comment
There was a problem hiding this comment.
LGTM, but best to wait for opinions
c0ffeeca7
left a comment
There was a problem hiding this comment.
A merge conflict appeared. Could you take a look?
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Proposed change
Move duplicated parts of the threshold triggers/conditions into a set of shared includes.
Applied it to temperature and humidity. If the approach is approved, we can extend it later to others.
Type of change
currentbranch).currentbranch).nextbranch).nextbranch).Additional information
Checklist
currentbranch.nextbranch.