# What is wrong with the temperature?

**URL:** <https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428>\
**Category:** General\
**Created:** [10 March 2021 18:22 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428 "2021-03-10T18:22:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kamcio](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kamcio](https://discourse.nodered.org/u/kamcio)\
**Post date:** [10 March 2021 18:22 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/1 "2021-03-10T18:22:02Z")

</div>

Hello together,

I don't know what I'm doing wrong with the temperature. Although we have 10.4 degrees today, all shutters fell down (see photo).  
Could someone help me how to configure everything to work properly?

 ![node_red](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/5/b52f1391e2e25ec67aa87f2dd071750a51d9886e.jpeg)

```auto
[{"id":"43cbfd79.d87b24","type":"trigger-state","z":"c70e6ef0.37d27","name":"Temp draußen unter 5 Grad","server":"ad8e5e9e.dec0c","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.temperatur_aussen_temperature","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"outputs":4,"customoutputs":[{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"current_state","comparatorType":"<=","comparatorValue":"5","comparatorValueDataType":"str","comparatorPropertyValue":"new_state.state"},{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"current_state","comparatorType":">","comparatorValue":"5","comparatorValueDataType":"str","comparatorPropertyValue":"new_state.state"}],"outputinitially":false,"state_type":"str","x":140,"y":120,"wires":[[],[],["a30116f2.59553"],["b9c61c95.74258"]],"icon":"font-awesome/fa-thermometer-2"},{"id":"ad8e5e9e.dec0c","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

```

Thank You in advance.

Best regards,  
Kamil

---

<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:** [10 March 2021 18:35 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/2 "2021-03-10T18:35:11Z")

</div>

The flow is not complete (only the first node was exported), but we do not have your house/devices and most likely no home assistant, so it will be hard to emulate.

What are the different outputs of the first node for ? And what kind of information is being received on them ?  
Attach debug nodes to all of them (set them to 'complete msg object'), are the values actual numbers or are they strings ?

---

<div class="post-metadata">

**Author:** ![kamcio](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kamcio](https://discourse.nodered.org/u/kamcio)\
**Post date:** [10 March 2021 19:11 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/3 "2021-03-10T19:11:15Z")

</div>

Thank You @bakman2 for the quick reply.

I hope, I have now exported the whole flow:

```auto
[{"id":"c70e6ef0.37d27","type":"tab","label":"Rollos","disabled":false,"info":""},{"id":"505d8cc7.37bd54","type":"api-call-service","z":"c70e6ef0.37d27","name":"Küchen und Schlafzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.kuche_rollo, cover.schlafzimmer_rollo","data":"{\"position\":27}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1300,"y":120,"wires":[[]]},{"id":"10dc5e6e.823062","type":"api-call-service","z":"c70e6ef0.37d27","name":"Wohnzimmer Rollo auf 27%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"set_cover_position","entityId":"cover.rollo_links","data":"{\"position\":27}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1420,"y":180,"wires":[[]]},{"id":"f4677fad.a0fcf","type":"api-call-service","z":"c70e6ef0.37d27","name":"Küchen und Wohnzimmer Rollo auf 100%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"open_cover","entityId":"cover.kuche_rollo, cover.rollo_links","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1300,"y":260,"wires":[[]]},{"id":"a30116f2.59553","type":"within-time-switch","z":"c70e6ef0.37d27","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":"","endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":440,"y":40,"wires":[["999b9efb.abb64","1ebbc1cb.06f966"],["8b7dc871.6f625","70598897.367cf8"]],"icon":"node-red-node-suncalc/sun.png"},{"id":"43cbfd79.d87b24","type":"trigger-state","z":"c70e6ef0.37d27","name":"Temp draußen unter 5 Grad","server":"ad8e5e9e.dec0c","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.temperatur_aussen_temperature","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"outputs":4,"customoutputs":[{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"current_state","comparatorType":"<=","comparatorValue":"5","comparatorValueDataType":"str","comparatorPropertyValue":"new_state.state"},{"messageType":"default","messageValue":"","messageValueType":"json","comparatorPropertyType":"current_state","comparatorType":">","comparatorValue":"5","comparatorValueDataType":"str","comparatorPropertyValue":"new_state.state"}],"outputinitially":false,"state_type":"str","x":140,"y":120,"wires":[[],[],["a30116f2.59553"],["b9c61c95.74258"]],"icon":"font-awesome/fa-thermometer-2"},{"id":"f1b2ba69.040f08","type":"api-call-service","z":"c70e6ef0.37d27","name":"Alle Rollos auf 0%","server":"ad8e5e9e.dec0c","version":1,"debugenabled":false,"service_domain":"cover","service":"close_cover","entityId":"cover.alle_rollos_shuttergroup","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1230,"y":40,"wires":[[]]},{"id":"2dbf1abd.2b5576","type":"weekday","z":"c70e6ef0.37d27","name":"weekend","sun":true,"mon":false,"tue":false,"wed":false,"thu":false,"fri":true,"sat":true,"x":1200,"y":180,"wires":[["10dc5e6e.823062"],[]]},{"id":"eb667754.daeb8","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":990,"y":120,"wires":[["505d8cc7.37bd54","2dbf1abd.2b5576"]]},{"id":"70598897.367cf8","type":"change","z":"c70e6ef0.37d27","name":"","rules":[{"t":"set","p":"reset","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":120,"wires":[["eb667754.daeb8","999b9efb.abb64"]]},{"id":"999b9efb.abb64","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":990,"y":40,"wires":[["f1b2ba69.040f08"]]},{"id":"8b7dc871.6f625","type":"trigger","z":"c70e6ef0.37d27","name":"","op1":"1","op2":"0","op1type":"pay","op2type":"val","duration":"0","extend":"false","units":"ms","outputs":1,"x":990,"y":260,"wires":[["f4677fad.a0fcf"]]},{"id":"1ebbc1cb.06f966","type":"change","z":"c70e6ef0.37d27","name":"","rules":[{"t":"set","p":"reset","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":160,"wires":[["8b7dc871.6f625"]]},{"id":"b9c61c95.74258","type":"within-time-switch","z":"c70e6ef0.37d27","name":"","nameInt":"","positionConfig":"c147288e.624ad","startTime":"sunset","startTimeType":"pdsTime","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunrise","endTimeType":"pdsTime","endOffset":"","endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":440,"y":240,"wires":[["eb667754.daeb8","1ebbc1cb.06f966"],["8b7dc871.6f625","70598897.367cf8"]],"icon":"node-red-node-suncalc/sun.png"},{"id":"ad8e5e9e.dec0c","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"c147288e.624ad","type":"position-config","name":"Neuss","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]

```

here are the outputs of the temperature:

 ![node_red-2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/80f11a6235ad0c1e4e77539e81385d65640bc703.jpeg)

I would like to have, that when the temperature is above 5 degrees, only two shutters go down. When the temperature go under 5 degrees, then go all shutters down.

Ok, I try with the debug node and post here the results.

---

<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:** [10 March 2021 19:25 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/4 "2021-03-10T19:25:36Z")

</div>

It looks like you are comparing strings against numbers.

---

<div class="post-metadata">

**Author:** ![kamcio](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kamcio](https://discourse.nodered.org/u/kamcio)\
**Post date:** [10 March 2021 19:29 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/5 "2021-03-10T19:29:42Z")

</div>

Should I change the "state typ" to numbers?

---

<div class="post-metadata">

**Author:** ![kamcio](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kamcio](https://discourse.nodered.org/u/kamcio)\
**Post date:** [10 March 2021 19:39 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/6 "2021-03-10T19:39:41Z")

</div>

Here the debug result:

 ![node_red-3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/3/f3fb64d787b2924c87e64e8640bfe96b70acc858.jpeg)

---

<div class="post-metadata">

**Author:** ![kamcio](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kamcio](https://discourse.nodered.org/u/kamcio)\
**Post date:** [10 March 2021 21:00 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/7 "2021-03-10T21:00:35Z")

</div>

Can somebody explain why now works??? Ok, I have changed the "state typ" to number - was that really the cause?

 ![node_red-4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae93c05513371d7d4d3443cb3998849af75c0b05.jpeg)

---

<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:** [11 March 2021 04:19 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/8 "2021-03-11T04:19:26Z")

</div>

> was that really the cause?

One of them. For the custom outputs you should also change the comparison type to number.

---

<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:** [10 May 2021 04:19 UTC](https://discourse.nodered.org/t/what-is-wrong-with-the-temperature/42428/9 "2021-05-10T04:19:53Z")

</div>

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