Hi Everyone,
I am getting familiar with home assistant and esphome. I have some ESP32 boards that i’d like to use for some sensors & actors.
I can control a relay board with 4 relais with the slider-buttons in Home Assistant / esphome. So far so good.
What is the best way to implement some logic to it. Instead of switching each individual relay on or off. I would like to select option A, B, C or D.
Option A: relay 1 is on. relays 2-4 are off
Option B: relay 2 is on. relays 1, 3, 4 are off
Option C: relay 3 is on. relays 1,2,4 are off
Option D: relay 4 is on. relays 1-3 are off
Has anyone done something similar? Do you use automations in home assistant or additional add-ons like node-red. Could you provide some code for a yaml file how to handle this?
Thanks nick. I didn’t make it to have it running with the script. I think due to syntax issues. But i will try to have it as a script in the next step. For now i found a easier solution with interlocks: