How to use button in dashboard to toggle Led in raspberry pi?

Hi,

i'm going to explain:
On electronic side:

  1. i have a Led connected to a gpio in a raspberry pi.
  2. there is no physically a button in the breadboard, only a led.

On node-red side:
i want to create a dashboard with a button which will when i press the first it should switch on the Led, on second press it should switch off the Led.

That's all.

What i tried:
in node-red, i created a dashboard and added a button node, inject node.
It happens nothing.
If i replace the button by a switch (on/off) it works fine.