mirror of
https://github.com/ratgdo/esphome-ratgdo.git
synced 2025-02-13 05:30:07 +00:00
Simplify distance sensor filtering
The throttle filter has a side effect of not updating the value when measurements are out of range. switching to throttle_average is simpler and solves this problem
This commit is contained in:
parent
d45c4dcf11
commit
dc796e6b00
@ -132,12 +132,7 @@ sensor:
|
|||||||
ratgdo_id: ${id_prefix}
|
ratgdo_id: ${id_prefix}
|
||||||
unit_of_measurement: "mm"
|
unit_of_measurement: "mm"
|
||||||
filters:
|
filters:
|
||||||
- throttle: 1s
|
- throttle_average: 1s
|
||||||
- filter_out: -1
|
|
||||||
- median:
|
|
||||||
window_size: 20
|
|
||||||
send_every: 5
|
|
||||||
send_first_at: 5
|
|
||||||
- platform: adc
|
- platform: adc
|
||||||
pin: GPIO34
|
pin: GPIO34
|
||||||
name: "Voltage"
|
name: "Voltage"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user