mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-12 20:10:50 +01:00
Update delta filter docs for new percentage mode (#2647)
This commit is contained in:
parent
2c1dd252f7
commit
67db98f803
@ -456,11 +456,28 @@ values.
|
||||
``delta``
|
||||
*********
|
||||
|
||||
This filter stores the last value passed through this filter and only
|
||||
passes incoming values through if the absolute difference is greater than the configured
|
||||
value. For example if a value of 1.0 first comes in, it's passed on. If the delta filter
|
||||
is configured with a value of 5, it will now not pass on an incoming value of 2.0, only values
|
||||
that are at least 6.0 big or -4.0.
|
||||
This filter stores the last value passed through this filter and only passes incoming values through
|
||||
if incoming value is sufficiently different from the previously passed one.
|
||||
This difference can be calculated in two ways an absolute difference or a percentage difference.
|
||||
|
||||
If a number is specified, it will be used as the absolute difference required.
|
||||
For example if the filter were configured with a value of 2 and the last value passed through was 10,
|
||||
only values greater than 12 or less than 8 would be passed through.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
filters:
|
||||
- delta: 2.0
|
||||
|
||||
If a percentage is specified a percentage of the last value will be used as the required difference.
|
||||
For example if the filter were configured with a value of 20% and the last value passed through was 10,
|
||||
only values greater than 12 or less than 8 would be passed through.
|
||||
However, if the last value passed through was 100 only values greater than 120 or less than 80 would be passed through.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
filters:
|
||||
- delta: 20%
|
||||
|
||||
``or``
|
||||
******
|
||||
|
Loading…
Reference in New Issue
Block a user