# Two ds18b20 sensors and i get one temperature

**URL:** <https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979>\
**Category:** General\
**Created:** [31 August 2019 16:55 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979 "2019-08-31T16:55:53Z")\
**Posts on this page:** 9\
**Page:** 2

<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:** [1 September 2019 21:39 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/21 "2019-09-01T21:39:10Z")

</div>

I think he meant the logic switch node not the ui switch node

---

<div class="post-metadata">

**Author:** ![RudiRuessel](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@RudiRuessel](https://discourse.nodered.org/u/RudiRuessel)\
**Post date:** [1 September 2019 21:40 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/22 "2019-09-01T21:40:22Z")

</div>

Ok, thanks for that. I insert the switch node, but there is still no

 ![156737380467913032701](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/381346ab311ccdc17ca09d65b2a625c9d4e82277.jpeg)  
This is how my flow looks like

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [1 September 2019 21:46 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/23 "2019-09-01T21:46:51Z")

</div>

If you export your flow and attach it to a reply (use three back tics on a line before and after your flow) it will make it easier to see what you're doing,

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [1 September 2019 21:48 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/24 "2019-09-01T21:48:44Z")

</div>

You have not formatted the switch node to have 2 outputs.  
Please look at the switch node information panel, and how the switch node operates.

---

<div class="post-metadata">

**Author:** ![RudiRuessel](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@RudiRuessel](https://discourse.nodered.org/u/RudiRuessel)\
**Post date:** [1 September 2019 21:51 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/25 "2019-09-01T21:51:04Z")

</div>

[{"id":"cd4e41df.9aea4","type":"switch","z":"e56a2129.2d864","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"AAF8E0521401","vt":"str"},{"t":"cont","v":"8A1579970203","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":501,"y":392,"wires":[["c89041ec.d0efb"],["22c9403e.ae8c6"]]}]

---

<div class="post-metadata">

**Author:** ![RudiRuessel](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@RudiRuessel](https://discourse.nodered.org/u/RudiRuessel)\
**Post date:** [1 September 2019 21:56 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/26 "2019-09-01T21:56:43Z")

</div>

Ok now i have two outputs. What should i write in the output fields?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [1 September 2019 22:01 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/27 "2019-09-01T22:01:58Z")

</div>

export your flow again and post it like @zenofmud indicated:

```  
your flow code  
```

The switch node you can configure like this:

 ![25](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/704c0275c5d7d58f60a59cf5d05f7aab65a51311.jpeg)

---

<div class="post-metadata">

**Author:** ![RudiRuessel](https://avatars.discourse-cdn.com/v4/letter/r/919ad9/32.png) [@RudiRuessel](https://discourse.nodered.org/u/RudiRuessel)\
**Post date:** [1 September 2019 22:09 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/28 "2019-09-01T22:09:02Z")

</div>

Thank you so much. After hours of trying and surfing in the internet iw 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:** [2 September 2019 06:12 UTC](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979/29 "2019-09-02T06:12:42Z")

</div>

The most important question. Do you understand _why_ it works?

[Previous page](https://discourse.nodered.org/t/two-ds18b20-sensors-and-i-get-one-temperature/14979.md?page=1)
