]> www.infradead.org Git - users/dwmw2/esp32-pool.git/commitdiff
Move clamp filter to ntc_resistance not temperature
authorDavid Woodhouse <dwmw@amazon.co.uk>
Sun, 15 Dec 2024 16:48:34 +0000 (16:48 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Sun, 15 Dec 2024 16:48:34 +0000 (16:48 +0000)
bathroomfloor.yaml
ufh.yaml

index f8cde1d58b55008e5fa16769cc002b90961971cc..031e4c90ab20d6b1d3e12b226b1542d8643aa946 100644 (file)
@@ -149,3 +149,5 @@ sensor:
       # 2.52 -> 2.49
       # 1.99 -> 1.96
 
+  - id: !extend ntc_resistance
+    resistor: 9.97kΩ
index 035d3ea37996c2279c650a893374702dd60f055c..6c5b2b42136807cdb04eb80718426a02d03e16ad 100644 (file)
--- a/ufh.yaml
+++ b/ufh.yaml
@@ -171,7 +171,7 @@ sensor:
           send_every: 1
           send_first_at: 1
       - clamp:
-          min_value: 8
+          min_value: 5
           max_value: 35
           ignore_out_of_range: true
     on_value:
@@ -186,19 +186,24 @@ sensor:
     id: ntc_resistance
     sensor: ntc_adc
     reference_voltage: 3.28v # measured
-    resistor: 9.97 kOhm
     configuration: DOWNSTREAM
     filters:
-      - median:
-          window_size: 5
-          send_every: 5
-          send_first_at: 5
+      - clamp:
+          min_value: 5000
+          max_value: 25000
+          ignore_out_of_range: true
 
   - platform: adc
     id: ntc_adc
     attenuation: 12dB
     update_interval: never
     pin: ${adc_pin}
+    # Still doing this manually because the new multisample support uses the mean not the median
+    filters:
+      - median:
+          window_size: 5
+          send_every: 5
+          send_first_at: 5
 
 climate:
   - platform: thermostat