From 06c2a338eb3c9ae52f74e791779ab5935565852d Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 25 Jan 2024 20:07:04 +0100 Subject: [PATCH] Relay Interlocking Solves #965 --- docs/customization.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/customization.md b/docs/customization.md index 9457e9b..51a62a0 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -29,6 +29,7 @@ Table of contents: - [Climate custom presets](#climate-custom-presets) - [Push button / Momentary switch](#push-button--momentary-switch) - [Expose relay fallback switch](#expose-relay-fallback-switch) + - [Relay Interlocking](#relay-interlocking)     @@ -602,3 +603,20 @@ switch: - id: !extend relay2_local internal: false ``` + +### Relay Interlocking +This is using ESPHome capability to prevents the two relays to be active at the same time, which could be useful in some cases, like to control a cover like discussed in [#965](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/965). + +> [!ATTENTION] +> There are some considerations about using software interlocking on the [ESPHome GPIO Switch documentation](https://esphome.io/components/switch/gpio.html#interlocking). Please read that carefully to understand what this is doing. + +```yaml +switch: + # Prevents the two relays to be on simultaneously + - id: !extend relay_1 + interlock: [relay_1, relay_2] + interlock_wait_time: 500ms # Please adjust this accordingly + - id: !extend relay_2 + interlock: [relay_1, relay_2] + interlock_wait_time: 500ms # Please adjust this accordingly +``` \ No newline at end of file