It's not that you have an issue, it is us then not knowing how it actually works! And thus, how we can help π
But as it doesn't actually matter the other is still off. But might be easiest to keep just all in sync:
description: ""
mode: single
triggers:
- trigger: state
entity_id:
- switch.module_1
- switch.module_2
to:
- "on"
from:
- "off"
id: "on"
- trigger: state
entity_id:
- switch.module_1
- switch.module_1
from:
- "on"
to:
- "off"
id: "off"
conditions: []
actions:
- if:
- condition: trigger
id:
- "on"
then:
- action: switch.turn_on
metadata: {}
target:
entity_id:
- switch.module_1
- switch.module_2
data: {}
else:
- action: switch.turn_off
metadata: {}
target:
entity_id:
- switch.module_1
- switch.module_2
data: {}
Could do a toggle on everything but if that gets out of sync (for example, a module is offline for a bit) it's a bit hard to get into sync. This will just force it into sync π
But with cutting the power to the smart bulbs it will still be a less solution as you rely on the state the bulb goes on in and you're not able to set a state to turn on to. And if it's a Zigbee or Thread bulb it breaks the network all the time. So best solution would be you connect them to fixe power. It's an easy fix, open one switch and move the wire from OUT to L π Or if it's a module that supports detached mode (like a Shelly), just set it to that mode.