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 high pass filter to sensor component #2705
Comments
That's a good idea and is useful. |
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the problem you have/What new integration you would like
There isn’t a high pass filter available for the esphome sensor component. Propose that one be added. Could be as simple as the example below.
Parameters:
alpha = time_constant/(time_constant+update_period)
Difference Equation
output = alpha * ( previous_output + input - previous_input)
Please describe your use case for this integration and alternatives you've tried:
Attempting to use an accelerometer to detect vibration and would like to be able to filter out DC accelerations (gravity, sensor bias) without having to calibrate or calculate the orientation of the sensor. I've tried adding this filter to a custom component based on the accelerometer component (MPU6050).
Additional context
I'm using the MPU6050 component to detect whether a machine is running. I think creating a custom component will work, but suspect that this functionality would be broadly useful.
The text was updated successfully, but these errors were encountered: