How to toggle WLED on/off?

I want to have a button that can toggle power to my WLED strip, which seems like a basic function but I can’t work out how to do it.

My WLED controller with 2 presets. #1 has the entire strip as a single segment and #2 has it as multiple segments.

image

It seems that when the strip is a single segment I need to use the entity light.wled to toggle power. However when using the segmented preset, I need to use light.wled_main to toggle the entire strip (light.wled just turns off the first segment in this case). Is this a bug?

Does the integration not support a general on/off switch? Is there a custom component that can save me? Or do I need to manually interact with the API of the controller?

1 Like

Ran into this issue myself. The playlist I used has any number of segments and the entity that needed to be toggled changes between presets.

Ultimately, I ended up using HA to load a preset in WLED that toggled the power from inside the light. If you don’t already have a preset to do that, you can make one by entering the command T=0 into the presets “API command” field. Uncheck “Use current state” if you don’t see the “API command” field when creating the preset in WLED.

1 Like

Thanks for sharing your solution. I should have come back to this, in the end the way I solved it was by putting the ‘WLED’ and ‘Main’ entities in a group.

1 Like