Skip to content

Commit 1e4c295

Browse files
committed
Improve distance sensor filtering
1 parent b12f524 commit 1e4c295

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

static/v32disco.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ sensor:
132132
ratgdo_id: ${id_prefix}
133133
unit_of_measurement: "mm"
134134
filters:
135-
- throttle_average: 60s
135+
- min:
136+
window_size: 900
137+
send_every: 1
138+
- heartbeat: 30s
136139
- platform: adc
137140
pin: GPIO34
138141
name: "Voltage"

static/v32disco_drycontact.yaml

+4-6
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,10 @@ sensor:
128128
ratgdo_id: ${id_prefix}
129129
unit_of_measurement: "mm"
130130
filters:
131-
- throttle: 10s
132-
- filter_out: -1
133-
- median:
134-
window_size: 20
135-
send_every: 5
136-
send_first_at: 5
131+
- min:
132+
window_size: 900
133+
send_every: 1
134+
- heartbeat: 30s
137135
- platform: adc
138136
pin: GPIO34
139137
name: "Voltage"

static/v32disco_secplusv1.yaml

+4-6
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,10 @@ sensor:
129129
ratgdo_id: ${id_prefix}
130130
unit_of_measurement: "mm"
131131
filters:
132-
- throttle: 10s
133-
- filter_out: -1
134-
- median:
135-
window_size: 20
136-
send_every: 5
137-
send_first_at: 5
132+
- min:
133+
window_size: 900
134+
send_every: 1
135+
- heartbeat: 30s
138136
- platform: adc
139137
pin: GPIO34
140138
name: "Voltage"

0 commit comments

Comments
 (0)