Fix type/templatable ordering in entity and template docs#6185
Fix type/templatable ordering in entity and template docs#6185jesserockz merged 1 commit intoesphome:currentfrom
Conversation
Reorder (templatable, type) to (type, templatable) so the schema validator correctly parses the type field. Affected files: - cover/template: position, tilt, current_operation - valve/template: position, current_operation - water_heater/template: current_temperature, target_temperature, mode, away, is_on - light/index: initial_state.state - text_sensor/index: text_sensor.state condition Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
WalkthroughType annotations are reordered in component documentation across five files, positioning primary types (float, string, boolean) before [templatable] annotations. No functional or behavioral changes introduced—purely documentation updates. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates several documentation option signatures to place the concrete type before the [templatable] marker, matching how the schema-doc tooling parses comma-separated type annotations in option parentheses.
Changes:
- Reordered option annotations from
(*Optional*, [templatable], type)to(*Optional*, type, [templatable])in affected docs. - Normalized list item indentation for the updated option entries so they render as intended list items.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/content/docs/components/cover/template.mdx | Reorders type/templatable for position, tilt, and current_operation in the publish action options. |
| src/content/docs/components/valve/template.mdx | Reorders type/templatable for position and current_operation in the publish action options. |
| src/content/docs/components/water_heater/template.mdx | Reorders type/templatable for several publish action options (current_temperature, target_temperature, mode, away, is_on). |
| src/content/docs/components/light/index.mdx | Reorders type/templatable for initial_state.state. |
| src/content/docs/components/text_sensor/index.mdx | Reorders type/templatable for text_sensor.state condition’s state field. |
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Summary
(templatable, type)to(type, templatable)in 5 entity documentation files[templatable]as the type field when it appears before the actual type, causing false "should be templatable" errorstype, [templatable](128 instances) vs[templatable], type(which these files used)Files changed
cover/template.mdx— position, tilt, current_operationvalve/template.mdx— position, current_operationwater_heater/template.mdx— current_temperature, target_temperature, mode, away, is_onlight/index.mdx— initial_state.statetext_sensor/index.mdx— text_sensor.state conditionTest plan
🤖 Generated with Claude Code