# Need a push button node

**URL:** <https://discourse.nodered.org/t/need-a-push-button-node/23404>\
**Category:** Dashboard\
**Created:** [21 March 2020 10:51 UTC](https://discourse.nodered.org/t/need-a-push-button-node/23404 "2020-03-21T10:51:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadeed](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@Shadeed](https://discourse.nodered.org/u/Shadeed)\
**Post date:** [21 March 2020 10:51 UTC](https://discourse.nodered.org/t/need-a-push-button-node/23404/1 "2020-03-21T10:51:38Z")

</div>

I need a kind of push button node in which if i push it it will output 1 and if i release it will output 0

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 March 2020 10:52 UTC](https://discourse.nodered.org/t/need-a-push-button-node/23404/2 "2020-03-21T10:52:29Z")

</div>

Try:

```auto
[{"id":"8d09f358.cc5c4","type":"ui_template","z":"1d85b106.5dfcd7","group":"2452ebe2.f30164","name":"Up","order":6,"width":2,"height":1,"format":"<button ng-mousedown=\"send({payload: 'down'})\" ng-mouseup=\"send({payload: 'up'})\"><i class=\"material-icons\"> volume_up </i></button>\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":130,"y":330,"wires":[["26653ac7.751afe"]]},{"id":"2452ebe2.f30164","type":"ui_group","z":"","name":"Audio","tab":"39b306a2.96619a","order":1,"disp":true,"width":6,"collapse":false},{"id":"39b306a2.96619a","type":"ui_tab","z":"","name":"TV remote control","icon":"dashboard","order":45,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [21 March 2020 11:07 UTC](https://discourse.nodered.org/t/need-a-push-button-node/23404/3 "2020-03-21T11:07:30Z")

</div>

Note:  
In Andrew's flow, you'll need to change the Send() values from 'down' and 'up' to '1' and '0'.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 March 2020 11:08 UTC](https://discourse.nodered.org/t/need-a-push-button-node/23404/4 "2020-03-21T11:08:33Z")

</div>

Ah, yes. Sorry.

I was torn between fixing it to be `1` and `0` or leaving it as is.

---

<div class="post-metadata">

**Author:** ![Shadeed](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@Shadeed](https://discourse.nodered.org/u/Shadeed)\
**Post date:** [26 March 2020 07:26 UTC](https://discourse.nodered.org/t/need-a-push-button-node/23404/5 "2020-03-26T07:26:48Z")

</div>

It works. I changed the values to 1 and 0. Thank you very much can you say how can i change the Icon?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [26 March 2020 08:45 UTC](https://discourse.nodered.org/t/need-a-push-button-node/23404/6 "2020-03-26T08:45:48Z")

</div>

Ok, the icon is in this part:

`<i class="material-icons"> volume_up </i>`

So that is the material design icon set.

There is also font awesome.

Links:

> **[Material Icons](https://material.io/resources/icons/?style=baseline)**
>
> Get Material Icons

[https://fontawesome.com/v4.7.0/icons/](https://fontawesome.com/v4.7.0/icons/)

Find what you want and put the name as needed.

If using fontawesome, the syntax is slightly different.

`<i class="fa fa-arrow-up fa-2x"></i>`

Hope that helps.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 April 2020 08:46 UTC](https://discourse.nodered.org/t/need-a-push-button-node/23404/7 "2020-04-09T08:46:18Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
