From: David Woodhouse Date: Fri, 18 Oct 2024 22:21:35 +0000 (+0100) Subject: Report 90 min max (to avoid trigging notifications for regen) X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=249ef0f126f7fbb7ee9a2f1a8de4ac4acb548cd5;p=users%2Fdwmw2%2Fesp32-pool.git Report 90 min max (to avoid trigging notifications for regen) --- diff --git a/softener.yaml b/softener.yaml index d1e7b84..c4cf32a 100644 --- a/softener.yaml +++ b/softener.yaml @@ -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);