# Need help on Climate sensor

**URL:** <https://discourse.nodered.org/t/need-help-on-climate-sensor/53682>\
**Category:** General\
**Created:** [13 November 2021 15:42 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682 "2021-11-13T15:42:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JJdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jjdave/32/39111_2.png) [@JJdave](https://discourse.nodered.org/u/JJdave)\
**Post date:** [13 November 2021 15:42 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682/1 "2021-11-13T15:42:18Z")

</div>

Hi, I have sucessfully integrated the climate integration from HA and use the climate sensors. For setting temperature points, I use the set\_temperate call, so far OK when I use a fix number for the temperature. Right now, I want to set\_temeparture by using a flow variable which was set before (I call it "SollwertBar"). This does not work, just brings me some error. Who could help me on this, may just strugglig with JSOnata expression. my test flow:

```auto
[{"id":"8d4e585f02fee72c","type":"debug","z":"875324fd.7af898","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1584.2222328186035,"y":160.80000495910645,"wires":[]},{"id":"842731a923c2c56a","type":"api-call-service","z":"875324fd.7af898","name":"22.7 °C H-Lounge","server":"a11aa034.815b8","version":3,"debugenabled":false,"service_domain":"climate","service":"set_temperature","entityId":"climate.heizung_ventil_lounge","data":"{\"temperature\":\"$flowContext('SollwertBar')\"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1401.9999504089355,"y":161.1110897064209,"wires":[["8d4e585f02fee72c"]]},{"id":"741f200c9452ae3e","type":"inject","z":"875324fd.7af898","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1198.4444851345486,"y":162.000003390842,"wires":[["842731a923c2c56a"]]},{"id":"a11aa034.815b8","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

```

Tx JJ

---

<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:** [13 November 2021 15:54 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682/2 "2021-11-13T15:54:29Z")

</div>

> [@JJdave](#):
>
> just brings me some error.

What error?

---

<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:** [13 November 2021 15:57 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682/3 "2021-11-13T15:57:35Z")

</div>

Your flow just consists of an inject node, an HA node and a debug node. Before I imported it I assumed you were picking up the variable from the context and passing it to the node. If you have configured it in the node then you may have to ask on an HA forum as very few (if any) here use HA.

---

<div class="post-metadata">

**Author:** ![JJdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jjdave/32/39111_2.png) [@JJdave](https://discourse.nodered.org/u/JJdave)\
**Post date:** [13 November 2021 16:30 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682/4 "2021-11-13T16:30:37Z")

</div>

Thank you, its just about the Syntax how to add the variable which I called SollwertBar, Tx

Von meinem/meiner Galaxy gesendet

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [13 November 2021 16:31 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682/5 "2021-11-13T16:31:44Z")

</div>

Your jsonata has quotes around the $flowContext() remove them

```auto
{"temperature":"$flowContext('SollwertBar')"

should be
{"temperature":$flowContext("SollwertBar")}

```

[edit] Just spotted the missing } at end

---

<div class="post-metadata">

**Author:** ![JJdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jjdave/32/39111_2.png) [@JJdave](https://discourse.nodered.org/u/JJdave)\
**Post date:** [13 November 2021 16:37 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682/6 "2021-11-13T16:37:41Z")

</div>

API Error

---

<div class="post-metadata">

**Author:** ![JJdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jjdave/32/39111_2.png) [@JJdave](https://discourse.nodered.org/u/JJdave)\
**Post date:** [13 November 2021 16:38 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682/7 "2021-11-13T16:38:34Z")

</div>

Tried that as well, didn't really work.

---

<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:** [12 January 2022 16:38 UTC](https://discourse.nodered.org/t/need-help-on-climate-sensor/53682/8 "2022-01-12T16:38:41Z")

</div>

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