Switch with toggle function


I’m using WLED 13b2 in a NodeMCU. My setup has a solid relay for the power supply (5V 12A), an 220V optocoupler for the wall switches, and close to 250 LEDs stripe.

Everything is awesome. I use the wall switches over all, but I also use the UI and the integration in home Assistant. But for me is strange when I turn off the WLED througt the UI or homeassistant, and the switches are still on.

If the next time I wanna turn on the WLED from the wall switches, I have to turn it off and turn it on again.

Is there any solution to do that the wall switches only toggle the current state?

For Blaz branch (not sure if it’s in master yet), set input type to Switch, create a preset with T=2 to toggle, then set both Off and On to call that preset on Time & Macros page.


sorry, I was away the last week.
I’m trying to do it, but I didn’t found the way to put the T=2 in the preset…
I was trying with “t”:2, but it doesnt’ work.

You enter it as is “T=2” (no quotes).

1 Like

Screenshot 2021-08-24 at 21.22.12

1 Like

Yeah! Thanks a lot! It works perfectly!
I thought that it only accepts JSON