I have 2 z-wave relays that are built in the wall behind the switch. (Qubino Flush 2 Relays)
When I turn on switch 1 (manually) the light at the output of the relay switches on (default behaviour).
What I want to do is to link multiple relays, so that when I toggle one switch, both lights come on, and when I then turn of the second relay, both lights should turn off.
I tried doing this by using Z-Wave Group Associations, but this creates a loop as I need the linking to work both ways.
I have tried making a Template Light, which does link the lights, but only when operated from the HA frontend, not when I use the physical switches.
I’ve also tried making automations, 2 per relay (so 4 in total) to cover all the switching possibilities (e.g. 1 to turn on light 1 when I turn on light 2, 1 to turn off light 1 when I turn off light 2, 1 to turn on light 2 when I turn on light 1, and 1 to turn off light 2 when I turn off light 1). But I’ve never got this to work unfortunately.
Basically I need the value template of the Template light to react to both the switches. Or is there another way I could get this functionality (maybe via more elegant automation(s) or scripts?)
Here are the automations I tried: https://pastebin.com/UXELPMt9
Here is the Template Light I tried: https://pastebin.com/4V6EsK4Z (the level template is like this because I have milights behind these relays, but I don’t really need this linking to happen at that level, so just ignore that)(more info on that: Combining Z-wave Relay with Milight light )