I have replaced the switch next to the door of my bedroom along with the two switches that are next to my bed. I can turn the ceiling light on and off using the very same switch, but not with differents one. So I went to HA automation and created 6 rules:
If door is switched on, turn on the other 2 switches
If door is switched off, turn off the other 2 switches
If my side switch is switched on, turn on the other 2 switches
If my side switch is switched off, turn off the other 2 switches
If her side switch is switched on, turn on the other 2 switches
If her side switch is switched off, turn off the other 2 switches
However, this sometimes works properly and sometime starts looping.
when main light turned on, turn on mine and hers as well.
when my light is switched off, turn off all lights
when my light is turned on, only turn on my light
Since the logic didn’t get the wife’s approval, when her light is turned on, only turn on her light, when her light is turned off, only turn off her light (so basically just just dumb on/off; however, it is still automated:”Please turn off the lights dear!”)
Outside 21:00-03:00 all switches work independently (like dumb switches)
I know it is not exactly the same, but maybe useful for inspiration
Sorry, but I am very very new and I didn’t explain myself very well. I have 3 switches controlling a single ceiling light. Before using the HA automation screen (not coding yet) if I pushed the door switch the celing light started working. However, I had to use the very same switch to make it stop working. It happened the same in every single switch (one next to my side of the bed and one next to my wife’s side of the bed). I used the automation UI to create automations and please find below the YAML code behind the automation generated via web UI.
I created six codes like this one that activates when the door switch goes from off to on (above), one when door goes from off to on, and the same logic for both bed switches (on->off and off->on).