# Slider value vs Slider display value

**URL:** <https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138>\
**Category:** General\
**Created:** [15 July 2020 16:41 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138 "2020-07-15T16:41:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zodiac-69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zodiac-69/32/29022_2.png) [@Zodiac-69](https://discourse.nodered.org/u/Zodiac-69)\
**Post date:** [15 July 2020 16:41 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/1 "2020-07-15T16:41:07Z")

</div>

Hi All

I have a slider set to 0 to 1023 for PWM on a ESPEasy.  
I would like the slider value on the UI to show 0 to 15,000 but still send 0 to 1023 to the ESPEasy via mqtt.

Any pointer will be appreciated.

Z

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 July 2020 16:53 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/2 "2020-07-15T16:53:46Z")

</div>

Welcome to the forum @Zodiac-69.

You can configure the slider to show 0 to 15000 and then feed the output through a Range node configured to scale the input range 0 to 15000 to the output range 0 to 1023. Feed it into a debug node initially to make sure it is doing what you expect.

---

<div class="post-metadata">

**Author:** ![Zodiac-69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zodiac-69/32/29022_2.png) [@Zodiac-69](https://discourse.nodered.org/u/Zodiac-69)\
**Post date:** [15 July 2020 17:11 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/3 "2020-07-15T17:11:26Z")

</div>

Hi Colin

Thank you for the rapid responce... It works 100%  
Still new to N-R, started last night.  
On a different "node", instead of posting a new topic, my slider send a value to mqtt and mqtt to espeasy.  
The message looks like this - ESP\_Easy/1/cmd,PWM,12, = 75 instead of ESP\_Easy/1/cmd,PWM,12,75.  
How do i get rid of the "=" in the message?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 July 2020 17:40 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/4 "2020-07-15T17:40:00Z")

</div>

Export the relevant nodes and post it here. Use the `</>` button and paste it in.

---

<div class="post-metadata">

**Author:** ![Zodiac-69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zodiac-69/32/29022_2.png) [@Zodiac-69](https://discourse.nodered.org/u/Zodiac-69)\
**Post date:** [15 July 2020 17:44 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/5 "2020-07-15T17:44:00Z")

</div>

Hi Colin  
Here is the node. Everything is working as i want, only the slider is not working as i need.

```auto
ESP_Easy PWM

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 July 2020 20:39 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/6 "2020-07-15T20:39:28Z")

</div>

I presume that is node-red-contrib-something but I don't know anything about esp\_easy (I use Tasmota) so I don't think I can help with this one. Probably best to start a new thread with title indicating the problem and then probably someone who does know about it should be able to help.

---

<div class="post-metadata">

**Author:** ![Zodiac-69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zodiac-69/32/29022_2.png) [@Zodiac-69](https://discourse.nodered.org/u/Zodiac-69)\
**Post date:** [15 July 2020 20:44 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/7 "2020-07-15T20:44:15Z")

</div>

Hi Colin  
I don't think it is ESPEasy issue, this is what i see in my MQTT broker - mosquitto - and for some reason there is an "=" that should not be there.  
As you can see, sending a command to switch the port on the ESPEasy on/off is the same and it works.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 July 2020 21:00 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/8 "2020-07-15T21:00:00Z")

</div>

> [@Zodiac-69](#):
>
> As you can see

Add a debug node showing what is going to the MQTT node and post what you see and, as I asked before, post the flow that generates that.  
It is late now so I won't be able to look again till tomorrow.

---

<div class="post-metadata">

**Author:** ![Zodiac-69](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zodiac-69/32/29022_2.png) [@Zodiac-69](https://discourse.nodered.org/u/Zodiac-69)\
**Post date:** [17 July 2020 10:04 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/9 "2020-07-17T10:04:35Z")

</div>

Hi Colin  
Thank you for your patience and assistance.  
I have managed to resolve the issue.  
The slider send a int where ESP is expecting "text" so i used a "template node" to convert the int to text.

---

<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:** [31 July 2020 10:04 UTC](https://discourse.nodered.org/t/slider-value-vs-slider-display-value/30138/10 "2020-07-31T10:04:36Z")

</div>

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