Document median filter. (#319)

This commit is contained in:
Jasper van der Neut - Stulen 2019-08-27 19:39:32 +02:00 committed by Brandon Davidson
parent da052a7838
commit 542853674a

View File

@ -104,6 +104,10 @@ for platforms with multiple sensors)
- 40.0 -> 45.0
- 100.0 -> 102.5
- filter_out: 42.0
- median:
window_size: 5
send_every: 5
send_first_at: 1
- sliding_window_moving_average:
window_size: 15
send_every: 15
@ -175,6 +179,40 @@ Filter out specific values to be displayed. For example to filter out the value
filters:
- filter_out: 85.0
``median``
**********
Calculate moving median over the data. This can be used to filter outliers from the received
sensor data. A large window size will make the filter slow to react to input changes.
.. code-block:: yaml
# Example configuration entry
- platform: wifi_signal
# ...
filters:
- median:
window_size: 7
send_every: 4
send_first_at: 3
- **median**: A `simple moving median
<https://en.wikipedia.org/wiki/Median_filter#Worked_1D_example>`__
over the last few values.
- **window_size**: The number of values over which to calculate the median
when pushing out a value. This number should
be odd if you want an actual received value pushed out.
Defaults to ``5``.
- **send_every**: How often a sensor value should be pushed out. For
example, in above configuration the median is calculated after every 4th
received sensor value, over the last 7 received values.
Defaults to ``5``.
- **send_first_at**: By default, the very first raw value on boot is immediately
published. With this parameter you can specify when the very first value is to be sent.
Must be smaller than or equal to ``send_every``
Defaults to ``1``.
``sliding_window_moving_average`` / ``exponential_moving_average``
******************************************************************