These are software interlocks. As such, a software bug (which can always happen) can still activate both switches at the same time. Similarly, at reset time (before any of ESPHome’s code runs) the relay GPIO pins may have pull-ups active, so the relay may be active before ESPHome can manually deactivate them.
So it is highly recommended to use hardware interlocks (like SPDT-type relays) that ensure that two GPIOs are never active at the same time.
I was searching in the web but could not find these types of relais anywhere. Can anybody give me a hint where to find these types of relais?
The commonly available relay modules are SPDT (they have C, NC and NO contacts), which are good for interlocking two switches.
The C (common) terminal connects to the power for your loads.
The NC (normally closed) contact connects to one of your loads. This one will be on when your relay is off.
The NO (normally open) contact connects to your other load. This one will be on when your relay is on.
This way only one of the loads can be on at a time. You can not turn off both loads. One will always be on.
My understanding is that the R2 (and R3) specifically has a hardware interlock but the other models don’t (there’s a table on the page I shared). I’ve tried to find a good schematic now to double check but can’t find one. I have an R2 but it’s in use (irrigation controller) so I can’t open it up to check.
@tom_l I need to interlock 2 switches but I also need to be able to turn off both loads to stop the blind motor. Due to this I am using a 2 way relais. So are there any 2 way relais where only one load can be turned on or is there any option to solve this issue?
In your setup, you have to switch both relays off for all off (UP off and DOWN off), and one on and one off for movement (UP on and DOWN off, or UP off and DOWN on).
If you switch both on by accidental software fault your blinds go up (as currently wired, you can change this to down).
In mine you have to switch one relay off for both off (POWER), but two for movement (POWER on, and DIRECTION on or off for DOWN or UP respectively).
If POWER accidentally gets switched on by software fault the direction the blinds go depends on the DIRECTION relay (off = UP, on = DOWN).