# I am very new to Node Red, have a question about Sliders

**URL:** https://discourse.nodered.org/t/i-am-very-new-to-node-red-have-a-question-about-sliders/60853
**Category:** General
**Created:** [6 April 2022 00:08 UTC](https://discourse.nodered.org/t/i-am-very-new-to-node-red-have-a-question-about-sliders/60853 "2022-04-06T00:08:55Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mikhael47](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikhael47/32/59644_2.png) [@mikhael47](https://discourse.nodered.org/u/mikhael47)
#### Post date: [6 April 2022 00:08 UTC](https://discourse.nodered.org/t/i-am-very-new-to-node-red-have-a-question-about-sliders/60853/1 "2022-04-06T00:08:55Z")

</div>

I am looking to take a slider and use it to adjust the value of the output of a dht22 humidity sensor.

The Humidity value is stored in msg.humidity and I would like the interface to allow me to "calibrate" the humidity by the amount selected on the slider.

I already have the humidity level triggering a relay

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [6 April 2022 02:57 UTC](https://discourse.nodered.org/t/i-am-very-new-to-node-red-have-a-question-about-sliders/60853/2 "2022-04-06T02:57:59Z")

</div>

So will this be a "standing" calibration ? i.e. the same value used to offset the return value from the DHt22 everytime NR is restarted - or would you expect the user to do another calibration after each restart ?

If you want to keep the calibration factor - then take the output of the slider - feed it into a change node and store this in a flow context variable (make sure you have persistent storage setup)

Then reference that flow variable each time you restart node red and/or take a Humidity reading and use that in your calculation

Craig

---

<div class="post-metadata">

### Author: ![mikhael47](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikhael47/32/59644_2.png) [@mikhael47](https://discourse.nodered.org/u/mikhael47)
#### Post date: [6 April 2022 12:56 UTC](https://discourse.nodered.org/t/i-am-very-new-to-node-red-have-a-question-about-sliders/60853/3 "2022-04-06T12:56:24Z")

</div>

My initial prototype does not require "standing" calibration. Once I have the code built, I'll be moving on to storing the data in a db. That being said, I can just store this in a flat file and use that as a flow variable.

Thanks for your suggestion. I appreciate it.

Mike

---

<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: [5 June 2022 12:56 UTC](https://discourse.nodered.org/t/i-am-very-new-to-node-red-have-a-question-about-sliders/60853/4 "2022-06-05T12:56:42Z")

</div>

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