Skip to content

Conversation

@swoboda1337
Copy link
Member

@swoboda1337 swoboda1337 commented Oct 21, 2025

Description:

I asked claude to make the filter examples more consistent.

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable):

  • esphome/esphome#

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/index.rst when creating new documents for new components or cookbook.

New Component Images

If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.

To generate a component image:

  1. Comment on this pull request with the following command, replacing COMPONENT_NAME with your component name in UPPER_CASE format with underscores (e.g., BME280, SHT3X, DALLAS_TEMP):

    @esphomebot generate image COMPONENT_NAME
    
  2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.

  3. Extract the SVG file and place it in the images/ folder of this repository.

  4. Use the image in your component's index table entry in /components/index.rst.

Example: For a component called "DHT22 Temperature Sensor", use:

@esphomebot generate image DHT22

@esphome esphome bot added the next label Oct 21, 2025
@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit b911bea
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/68f7943811dd3b0008ff5bfd
😎 Deploy Preview https://deploy-preview-5508--esphome.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 project configuration.

@swoboda1337 swoboda1337 reopened this Oct 21, 2025
@swoboda1337 swoboda1337 changed the base branch from next to current October 21, 2025 14:02
@swoboda1337 swoboda1337 marked this pull request as ready for review October 21, 2025 14:03
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Walkthrough

Documentation updates across 14 sensor filter configuration files in ESPHome. Changes include standardizing YAML example formats by promoting nested configurations to top-level entries, updating example headers for consistency, simplifying filter demonstrations, and adding new illustrative configuration examples for NTC resistance and temperature sensors.

Changes

Cohort / File(s) Summary
YAML header standardization
content/components/sensor/filter/{or,timeout}.md
Updated example section headers from "# Example filters:" to "# Example configuration entry" without changing underlying configuration.
Top-level filter promotion
content/components/sensor/filter/{clamp,round,round_to_multiple_of,skip_initial}.md
Reformatted YAML examples by removing platform-scoped wrapper blocks and promoting nested filters to top-level entries. Adjusted indentation and removed associated platform lines.
Filter chain restructuring
content/components/sensor/filter/{filter_out,offset,throttle}.md
Refactored YAML examples to shift scope from platform-specific to global configuration; filter_out and offset removed multiply operations; throttle removed ancillary filter examples (heartbeat, debounce, delta, lambda).
New example configurations
content/components/sensor/filter/{delta,lambda}.md
Added illustrative YAML blocks demonstrating filter functionality with specific parameter values.
Extended examples
content/components/sensor/filter/{to_ntc_resistance,to_ntc_temperature}.md
Added multiple template platform sensor examples showcasing calibration formats (three-point and Steinhart-Hart coefficients), lambda usage, and update intervals.
Value list enhancement
content/components/sensor/filter/throttle_with_priority.md
Added value list (nan, 0) under throttle_with_priority alongside existing timeout configuration; updated header for consistency.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

The changes are homogeneous documentation edits across related sensor filter files with consistent reformatting patterns (YAML restructuring, header standardization) and illustrative examples. While spread across many files, the repetitive nature and lack of functional logic changes reduce review complexity.

Suggested labels

documentation, current

Suggested reviewers

  • clydebarrow
  • frenck
  • jesserockz

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "[sensors] Make filters consistent" directly aligns with the primary objective of this changeset. The raw summary shows that across all modified filter documentation files, the YAML examples are being reformatted and standardized—including changes like converting platform-scoped configurations to top-level entries, updating comment headers from "# Example filters:" to "# Example configuration entry", adjusting indentation, and adding consistent example configurations. The title accurately captures this consolidation effort in concise language that would help a teammate understand the main purpose of the changes when scanning history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed The PR description states "I asked claude to make the filter examples more consistent," which directly aligns with the changeset. The raw summary shows that changes across multiple filter documentation files involve standardizing YAML example formatting, restructuring examples from nested platform-scoped configurations to top-level entries, and making consistent header changes (from "# Example filters:" to "# Example configuration entry"). The description accurately captures the overall intent of the changes, making examples consistent across the filter documentation. While the description could provide more specific detail, it is clearly related to the changeset and not off-topic.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@swoboda1337 swoboda1337 added current and removed next labels Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant