From ae32c98b60549187c56bdaf9a9cd0715aac98706 Mon Sep 17 00:00:00 2001 From: Brandon Harvey Date: Sun, 12 Apr 2026 12:29:13 -0500 Subject: [PATCH] feat: add debounce filters to water level sensors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add delayed_on/delayed_off filters to prevent sensor bounce from CPAP air intake waves spamming HA logbook and falsely re-triggering refills. Also fix typo in output sensor ID (fulid → fluid). --- Integrations/ESPHome/Core.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Integrations/ESPHome/Core.yaml b/Integrations/ESPHome/Core.yaml index a5e0790..5aa3be7 100644 --- a/Integrations/ESPHome/Core.yaml +++ b/Integrations/ESPHome/Core.yaml @@ -268,6 +268,9 @@ binary_sensor: input: true pullup: true inverted: true + filters: + - delayed_on: 5s + - delayed_off: 5s on_release: then: - if: @@ -285,7 +288,7 @@ binary_sensor: - platform: gpio name: Fluid Output - id: fulid_output_sensor + id: fluid_output_sensor icon: mdi:water device_class: moisture pin: @@ -294,6 +297,8 @@ binary_sensor: input: true pullup: true inverted: true + filters: + - delayed_off: 5s number: - platform: template @@ -442,7 +447,7 @@ script: condition: - and: - switch.is_on: stop_pump_when_full - - binary_sensor.is_on: fulid_output_sensor + - binary_sensor.is_on: fluid_output_sensor then: - logger.log: "Pump stopping - tank full" - switch.turn_off: pump_control