]> www.infradead.org Git - users/dwmw2/esp32-pool.git/commitdiff
Report 90 min max (to avoid trigging notifications for regen)
authorDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 18 Oct 2024 22:21:35 +0000 (23:21 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 18 Oct 2024 22:21:35 +0000 (23:21 +0100)
softener.yaml

index d1e7b84c0dfb9c0241f743b4b2ffecc9f36a1de7..c4cf32a2e443e996613725cdc1ce4ee490104c5d 100644 (file)
@@ -88,6 +88,20 @@ binary_sensor:
 
 
 sensor:
+  - platform: template
+    id: hx711_90m_max
+    unit_of_measurement: kg
+    filters:
+      - max:
+         window_size: 90
+         send_every: 1
+         send_first_at: 1
+    on_value:
+      then:
+        lambda: |-
+          if (!isnan(x))
+            id(tell_domo_svalue)->execute(914, std::to_string(x));
+
   - platform: hx711
     dout_pin:
       number: GPIO2 # Orange
@@ -96,7 +110,7 @@ sensor:
         pullup: true
     clk_pin: GPIO1 # Yellow
     gain: 128
-    update_interval: 30s
+    update_interval: 60s
     name: "HX711 value"
     filters:
     - calibrate_linear:
@@ -108,3 +122,4 @@ sensor:
         lambda: |-
           if (!isnan(x))
             id(tell_domo_svalue)->execute(524, std::to_string(x));
+            id(hx711_90m_max).publish_state(x - 50);