1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Add 'map_linear' and 'clamp' sensor filters (#5040)

This commit is contained in:
Mat931
2023-07-30 21:09:09 +00:00
committed by GitHub
parent 794a4bd9a1
commit cd46a69f2c
5 changed files with 137 additions and 23 deletions

View File

@@ -379,9 +379,13 @@ sensor:
- offset: 2.0
- multiply: 1.2
- calibrate_linear:
- 0.0 -> 0.0
- 40.0 -> 45.0
- 100.0 -> 102.5
datapoints:
- 0.0 -> 0.0
- 40.0 -> 45.0
- 100.0 -> 102.5
- clamp:
min_value: -100
max_value: 100
- filter_out: 42.0
- filter_out: nan
- median:

View File

@@ -88,8 +88,12 @@ sensor:
- debounce: 500s
- timeout: 10min
- calibrate_linear:
- 0 -> 0
- 100 -> 100
method: exact
datapoints:
- -1 -> 3
- 0.0 -> 1.0
- 1.0 -> 2.0
- 2.0 -> 3.0
- calibrate_polynomial:
degree: 3
datapoints: