From 7f6cb199836c92e951e5cb96abdd077f3d7f07c2 Mon Sep 17 00:00:00 2001 From: Matt MacAdam Date: Sun, 2 Jun 2024 15:41:07 -0700 Subject: [PATCH] update base.yaml to toggle door if close and open contacts are triggered simulteaneously --- base.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/base.yaml b/base.yaml index ddf6272..7b6ef99 100644 --- a/base.yaml +++ b/base.yaml @@ -136,13 +136,20 @@ binary_sensor: name: "Dry contact open" entity_category: diagnostic filters: - - delayed_on_off: 500ms + - delayed_on: 50ms + - delayed_off: 500ms on_press: + - delay: 50ms - if: condition: binary_sensor.is_off: ${id_prefix}_dry_contact_close then: - cover.open: ${id_prefix}_garage_door + - if: + condition: + binary_sensor.is_on: ${id_prefix}_dry_contact_close + then: + - cover.toggle: ${id_prefix}_garage_door - platform: gpio id: "${id_prefix}_dry_contact_close" pin: @@ -154,8 +161,10 @@ binary_sensor: name: "Dry contact close" entity_category: diagnostic filters: - - delayed_on_off: 500ms + - delayed_on: 50ms + - delayed_off: 500ms on_press: + - delay: 50ms - if: condition: binary_sensor.is_off: ${id_prefix}_dry_contact_open