]> www.infradead.org Git - users/dwmw2/esp32-pool.git/commitdiff
More smoothing
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 14 Oct 2024 18:23:53 +0000 (19:23 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 14 Oct 2024 18:23:53 +0000 (19:23 +0100)
bathroomfloor.yaml

index 69da041fb1ea902a87add933b5624f3d44946e80..79ea5b2f1656d530734356e18df26d7a3a35a6c8 100644 (file)
@@ -156,6 +156,7 @@ switch:
 
 sensor:
   - platform: ntc
+    id: ntc_temperature
     sensor: ntc_resistance
     calibration:
     # Hiwell E91.716 gives these in detail. The SunStone Touchstat manual just says
@@ -174,8 +175,10 @@ sensor:
 #    - 12.55 kOhm - > 17.6°C
      -  12.30 kOhm -> 18.2°C
      -  9.97  kOhm -> 23.5°C
-    id: ntc_temperature
     filters:
+      - exponential_moving_average:
+          send_every: 1
+          send_first_at: 1
       - clamp:
           min_value: 5
           max_value: 35
@@ -193,10 +196,10 @@ sensor:
     resistor: 9.97 kOhm
     configuration: DOWNSTREAM
     filters:
-      - sliding_window_moving_average:
-          window_size: 3
-          send_every: 3
-          send_first_at: 3
+      - median:
+          window_size: 5
+          send_every: 5
+          send_first_at: 5
 
   - platform: adc
     id: ntc_adc
@@ -217,6 +220,7 @@ climate:
     min_heating_off_time: 300s
     min_heating_run_time: 300s
     min_idle_time: 30s
+    heat_deadband: 0.2°C
     heat_action:
       - switch.turn_on: ufh_relay
     idle_action:
@@ -236,11 +240,15 @@ interval:
   - interval: 60s
     then:
       - switch.turn_on: ntc_vcc
-      - delay: 2s
-      - component.update: ntc_adc
       - delay: 1s
       - component.update: ntc_adc
-      - delay: 1s
+      - delay: 0.5s
+      - component.update: ntc_adc
+      - delay: 0.5s
+      - component.update: ntc_adc
+      - delay: 0.5s
+      - component.update: ntc_adc
+      - delay: 0.5s
       - component.update: ntc_adc
       - switch.turn_off: ntc_vcc