From dc796e6b006ecba43b0def8e0ae9a503c2960e77 Mon Sep 17 00:00:00 2001 From: Paul Wieland Date: Tue, 28 Jan 2025 16:00:37 -0500 Subject: [PATCH] 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 --- static/v32disco.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/static/v32disco.yaml b/static/v32disco.yaml index b73a5dd..18a2f7e 100644 --- a/static/v32disco.yaml +++ b/static/v32disco.yaml @@ -132,12 +132,7 @@ sensor: ratgdo_id: ${id_prefix} unit_of_measurement: "mm" filters: - - throttle: 1s - - filter_out: -1 - - median: - window_size: 20 - send_every: 5 - send_first_at: 5 + - throttle_average: 1s - platform: adc pin: GPIO34 name: "Voltage"