Skip to content

Conversation

@latonita
Copy link
Contributor

Description:

Related issue (if applicable): fixes

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

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.

@netlify
Copy link

netlify bot commented Nov 10, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 286864b
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/6911d536ce15320008980f15
😎 Deploy Preview https://deploy-preview-5584--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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds documentation for two new sensor filters: high_pass and low_pass. These filters provide signal processing capabilities to remove high-frequency noise or low-frequency drift from sensor readings.

  • Added documentation for high_pass and low_pass filters with explanations, formulas, and usage examples
  • Integrated the new filters into the main sensor documentation index in alphabetical order
  • Added filter examples to the comprehensive filter list

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
content/components/sensor/filter/low_pass.md New documentation for the low_pass filter with configuration details and example
content/components/sensor/filter/high_pass.md New documentation for the high_pass filter with configuration details and example
content/components/sensor/_index.md Added high_pass and low_pass filter sections and examples to the main sensor documentation

assuming the sensor values are sampled at a constant rate. This filter will remove low-frequency
components and offset from the sensor values.

The formula for the high pass filter is: ``y[i] := α × y[i−1] + α × (x[i] − x[i−1])``,
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Inconsistent multiplication symbol used. The formula uses × (Unicode multiplication sign) while the low_pass filter uses * (asterisk) in its formula. For consistency and to match code syntax conventions, use * instead of ×. Change α × y[i−1] + α × (x[i] − x[i−1]) to α * y[i−1] + α * (x[i] − x[i−1]).

Suggested change
The formula for the high pass filter is: ``y[i] := α × y[i−1] + α × (x[i] − x[i−1])``,
The formula for the high pass filter is: ``y[i] := α * y[i−1] + α * (x[i] − x[i−1])``,

Copilot uses AI. Check for mistakes.
headless: true
---

Basic [low pass filter](https://en.wikipedia.org/wiki/Low-pass_filter>) for the sensor values,
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The Wikipedia link has a malformed closing bracket. The link should end with ) instead of >). Change [low pass filter](https://en.wikipedia.org/wiki/Low-pass_filter>) to [low pass filter](https://en.wikipedia.org/wiki/Low-pass_filter).

Suggested change
Basic [low pass filter](https://en.wikipedia.org/wiki/Low-pass_filter>) for the sensor values,
Basic [low pass filter](https://en.wikipedia.org/wiki/Low-pass_filter) for the sensor values,

Copilot uses AI. Check for mistakes.
headless: true
---

Basic [high pass filter](https://en.wikipedia.org/wiki/High-pass_filter>) for the sensor values,
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The Wikipedia link has a malformed closing bracket. The link should end with ) instead of >). Change [high pass filter](https://en.wikipedia.org/wiki/High-pass_filter>) to [high pass filter](https://en.wikipedia.org/wiki/High-pass_filter).

Suggested change
Basic [high pass filter](https://en.wikipedia.org/wiki/High-pass_filter>) for the sensor values,
Basic [high pass filter](https://en.wikipedia.org/wiki/High-pass_filter) for the sensor values,

Copilot uses AI. Check for mistakes.
where ``x`` is the input value and ``y`` is the output value.

A lower α implies that the output will respond more slowly to changes in the input but will also
be less influenced by noise. We can say the system has more inertia. A value of 0.5 (when time constant equal sampling period) might be a good starting point for experimentation.
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Grammar error: "equal" should be "equals". Change "when time constant equal sampling period" to "when time constant equals sampling period".

Suggested change
be less influenced by noise. We can say the system has more inertia. A value of 0.5 (when time constant equal sampling period) might be a good starting point for experimentation.
be less influenced by noise. We can say the system has more inertia. A value of 0.5 (when time constant equals sampling period) might be a good starting point for experimentation.

Copilot uses AI. Check for mistakes.
even small changes in input.

A small α implies that the output will decay quickly and will require large changes in the input
to cause the output to change much. A value of 0.5 (when time constant equal sampling period) might be a good starting point for experimentation.
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Grammar error: "equal" should be "equals". Change "when time constant equal sampling period" to "when time constant equals sampling period".

Suggested change
to cause the output to change much. A value of 0.5 (when time constant equal sampling period) might be a good starting point for experimentation.
to cause the output to change much. A value of 0.5 (when time constant equals sampling period) might be a good starting point for experimentation.

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +23
# Example configuration entry
- platform: wifi_signal
# ...
filters:
- low_pass: 0.25
```

Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The configuration variable description is incomplete and inconsistent with the example usage. The example shows - low_pass: 0.25 (using the filter name directly with a value), but the configuration variable is named alpha. Either clarify that the shorthand syntax sets the alpha parameter, or show the full configuration format. Compare with exponential_moving_average which shows both shorthand and full formats in its example.

Suggested change
# Example configuration entry
- platform: wifi_signal
# ...
filters:
- low_pass: 0.25
```
# Example configuration entry (shorthand)
- platform: wifi_signal
# ...
filters:
- low_pass: 0.25 # Shorthand: sets alpha to 0.25
# Example configuration entry (full format)
- platform: wifi_signal
# ...
filters:
- low_pass:
alpha: 0.25

Note: The shorthand syntax (- low_pass: 0.25) is equivalent to the full format (- low_pass: { alpha: 0.25 }) and sets the alpha parameter.

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +29
# Example configuration entry
- platform: wifi_signal
# ...
filters:
- high_pass: 0.75
```

Configuration variables:

- **alpha** (*Required*, float): *Alpha* smoothing factor for the high pass filter. From 0 to 1.
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The configuration variable description is incomplete and inconsistent with the example usage. The example shows - high_pass: 0.75 (using the filter name directly with a value), but the configuration variable is named alpha. Either clarify that the shorthand syntax sets the alpha parameter, or show the full configuration format. Compare with exponential_moving_average which shows both shorthand and full formats in its example.

Suggested change
# Example configuration entry
- platform: wifi_signal
# ...
filters:
- high_pass: 0.75
```
Configuration variables:
- **alpha** (*Required*, float): *Alpha* smoothing factor for the high pass filter. From 0 to 1.
# Example configuration entry (shorthand and full format)
- platform: wifi_signal
# ...
filters:
# Shorthand: sets alpha directly
- high_pass: 0.75
# Full configuration format
- high_pass:
alpha: 0.75

Configuration variables:

  • alpha (Required, float): Alpha smoothing factor for the high pass filter. From 0 to 1.

    You can use the shorthand syntax - high_pass: 0.75 which is equivalent to - high_pass: { alpha: 0.75 }.

Copilot uses AI. Check for mistakes.
@latonita latonita changed the title high_pass and low_pass filters [sensors] High-pass and low-pass filters Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant