# Two segments, two switches one relay

**URL:** <https://wled.discourse.group/t/two-segments-two-switches-one-relay/10714>\
**Category:** Questions\
**Created:** [January 9, 2024, 8:53pm UTC](https://wled.discourse.group/t/two-segments-two-switches-one-relay/10714 "2024-01-09T20:53:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gediminas76](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/gediminas76/32/6887_2.png) [@gediminas76](https://wled.discourse.group/u/gediminas76)\
**Post date:** [January 9, 2024, 8:54pm UTC](https://wled.discourse.group/t/two-segments-two-switches-one-relay/10714/1 "2024-01-09T20:54:00Z")

</div>

I have living room sealing ambilights with two segments. I want to control them independently. And it would be nice to have relay switch off when both segments are off and relay on when one, or both segments are on.  
I managed to figure out how to control segment with switch. And I can do it with two key wall mount regular switch. But relay stays on, when both segments are off. And if I switch off leds in app, then segmens are not reacting to switch.

Any ideas how to make it work with API?

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [January 10, 2024, 6:16am UTC](https://wled.discourse.group/t/two-segments-two-switches-one-relay/10714/2 "2024-01-10T06:16:56Z")

</div>

you can’t with stock FW  
you can do it using Multi relay usermod, mark relays as external and then modify presets to include relay commands
