# Button: Set Lights to white and toggle LED status?

**URL:** <https://wled.discourse.group/t/button-set-lights-to-white-and-toggle-led-status/557>\
**Category:** Questions\
**Created:** [June 17, 2020, 9:24pm UTC](https://wled.discourse.group/t/button-set-lights-to-white-and-toggle-led-status/557 "2020-06-17T21:24:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daranto](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/daranto/32/362_2.png) [@daranto](https://wled.discourse.group/u/daranto)\
**Post date:** [June 17, 2020, 9:24pm UTC](https://wled.discourse.group/t/button-set-lights-to-white-and-toggle-led-status/557/1 "2020-06-17T21:24:27Z")

</div>

Hello all,

thanks a lot for WLED. The software is just great. So far I have everything working, only the button causes me problems.

I would like to make sure that when the button is pressed, the LEDs turn white and turn on. When I press the button again, the LEDs should turn off.

I would have thought according to API it would be possible with the following macro:

T=2&A=255&FX=0&R=255&G=255&B=255

* * *

T=2 toggle

A=255 brightness

FX=0 no effect

and the rest sets the colors.

However, the LEDs are not switched on when the button is pressed. If I switch the LEDs on via APP and then press the button the LEDs turn off.

Maybe somebody knows the answer.

Daranto

---

<div class="post-metadata">

**Author:** ![tonyno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tonyno/32/242_2.png) [@tonyno](https://wled.discourse.group/u/tonyno)\
**Post date:** [June 21, 2020, 3:12pm UTC](https://wled.discourse.group/t/button-set-lights-to-white-and-toggle-led-status/557/2 "2020-06-21T15:12:49Z")

</div>

Did you set that macro to be called by the button-press?

 ![image](https://global.discourse-cdn.com/free1/uploads/wled/original/1X/2c8df001bc134f0c9dc0e9a4af37343b4bc3be97.png)

---

<div class="post-metadata">

**Author:** ![daranto](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/daranto/32/362_2.png) [@daranto](https://wled.discourse.group/u/daranto)\
**Post date:** [June 21, 2020, 6:12pm UTC](https://wled.discourse.group/t/button-set-lights-to-white-and-toggle-led-status/557/3 "2020-06-21T18:12:14Z")

</div>

Hello,

Yes I have set the button to the correct Macro spot

---

<div class="post-metadata">

**Author:** ![daranto](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/daranto/32/362_2.png) [@daranto](https://wled.discourse.group/u/daranto)\
**Post date:** [June 21, 2020, 6:13pm UTC](https://wled.discourse.group/t/button-set-lights-to-white-and-toggle-led-status/557/4 "2020-06-21T18:13:08Z")

</div>

I think the problem is, that there is not a on and off macro option like the Alexa part.

---

<div class="post-metadata">

**Author:** ![tonyno](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/tonyno/32/242_2.png) [@tonyno](https://wled.discourse.group/u/tonyno)\
**Post date:** [June 21, 2020, 8:00pm UTC](https://wled.discourse.group/t/button-set-lights-to-white-and-toggle-led-status/557/5 "2020-06-21T20:00:23Z")

</div>

Ah ha. No, It’s only presses. You can modify the code for that, though.
