# Value from slider

**URL:** https://discourse.nodered.org/t/value-from-slider/20757
**Category:** General
**Created:** [23 January 2020 06:41 UTC](https://discourse.nodered.org/t/value-from-slider/20757 "2020-01-23T06:41:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![danny\_v1](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@danny\_v1](https://discourse.nodered.org/u/danny_v1)
#### Post date: [23 January 2020 06:41 UTC](https://discourse.nodered.org/t/value-from-slider/20757/1 "2020-01-23T06:41:17Z")

</div>

Hi to all,

first sorry for my english, sometimes it is not the best english.

I am new to node red and I have some beginner questions.  
My actual problem:

I want to send a massage to an esp contoller with mqtt. The communitaction is working, the frist massages are also working fine. Now I want to send this massage "brightness:X" and X should be a value from a dashborad slider.

I have tried to google but I was not able to find something. I hope some of you can help me.

Thanks danny\_v1

---

<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: [23 January 2020 06:47 UTC](https://discourse.nodered.org/t/value-from-slider/20757/2 "2020-01-23T06:47:09Z")

</div>

Hi.

This is how you do it with the two nodes.  
Please understand I can't set the MQTT topic, etc.

But this is how you connect them.

```auto
[{"id":"821e7123.2c3898","type":"ui_slider","z":"9245b569.9f881","name":"","label":"slider","tooltip":"","group":"596129cc.2bc108","order":1,"width":0,"height":0,"passthru":true,"outs":"end","topic":"","min":0,"max":10,"step":1,"x":460,"y":4610,"wires":[["a323ab00.fdf3c"]]},{"id":"a323ab00.fdf3c","type":"mqtt out","z":"9245b569.9f881","name":"","topic":"","qos":"","retain":"","x":610,"y":4610,"wires":[]},{"id":"596129cc.2bc108","type":"ui_group","z":"","name":"Load monitor","tab":"6bedb3c5.f5ae94","order":2,"disp":true,"width":"3"},{"id":"6bedb3c5.f5ae94","type":"ui_tab","z":"","name":"TimePi Remote control","icon":"fa-dashboard","order":1,"disabled":false,"hidden":false}]

```

Copy all this to your clipboard.

Go into Node-red and `import` via the menu on the right.  
Paste the code into the _box_/area for input.

One suggestion - which I set - is to set the `slider` node so it only sends the value once you release the slider.

Good luck and welcome to node-red.

This is what it looks like:

![Screenshot from 2020-01-23 17-47-20](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f1c0b9d3b7677f61ca9b4bf4994246c51a21e7cb.png)

---

<div class="post-metadata">

### Author: ![danny\_v1](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@danny\_v1](https://discourse.nodered.org/u/danny_v1)
#### Post date: [23 January 2020 06:52 UTC](https://discourse.nodered.org/t/value-from-slider/20757/3 "2020-01-23T06:52:22Z")

</div>

Thank you very much,

I will try it this evening.

---

<div class="post-metadata">

### Author: ![danny\_v1](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@danny\_v1](https://discourse.nodered.org/u/danny_v1)
#### Post date: [23 January 2020 18:04 UTC](https://discourse.nodered.org/t/value-from-slider/20757/4 "2020-01-23T18:04:31Z")

</div>

Hi,  
I tried it but there is only the value from the slider in the massage, so the massage is for example "1".  
But I need to add a string to this massage so that it looks like this :"brightness:1".

I hope someone can help me.

Thanks danny\_v1

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [23 January 2020 18:08 UTC](https://discourse.nodered.org/t/value-from-slider/20757/5 "2020-01-23T18:08:46Z")

</div>

insert a template node with `brightness:{{payload}}` in it

---

<div class="post-metadata">

### Author: ![danny\_v1](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@danny\_v1](https://discourse.nodered.org/u/danny_v1)
#### Post date: [23 January 2020 18:44 UTC](https://discourse.nodered.org/t/value-from-slider/20757/6 "2020-01-23T18:44:28Z")

</div>

Now it works, thank you very much!

Is there a good document I can read to such "standard" informations?
