I have a flow that sets temperature for each radiator thermostat. The idea is to lower the temperature on all radiators at bedtime and bring the temp back up again in the morning. I double it, so it also lowers the temp when we are out of the house, but back up again before we come home. So, 2 times down+up at given intervals. I built it like this (flow below):
- a timer node that sends a “start night-lowering”, “end night-lowering”, “start day-lowering” and “end day-lowering” strings.
- for each device (thermostat), I then have a change node, that translates each of the above 4 strings to a value such as { data: { “entity_id”: “climate.kaeldervaerelse”, “temperature”: 21.5 } }
- this value is then passed on to a call service node that identifies the DOMAIN as “Climate” and SERVICE as “set_temperature” - and should then append the above {…} data part and form a succesful call to lower or increase the temperature accordingly.
this has worked flawlessly for years, but now I get the error message:
Call-service error. must contain at least one of temperature, target_temp_high, target_temp_low.
and only this part is the output from the call service node (the Domain and Service parts):
{"domain":"climate","service":"set_temperature"}
so, the data part with the info on what device and what temp, is omitted.
I am really lost. I think it stopped working when I upgraded Node-Red some weeks ago. It appears to me, that the formatting of the data part I am trying to pass from change node to call service node is malformed somehow.
I am not a developer - and am lost, admitted
The flow (I included only one changenode/thermostat (but I have 9) - they all share the same one call service node:
[{"id":"9f1659e5.39bb9","type":"inject","z":"86416040.3b86f","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":90,"y":31,"wires":[["e28bde86.5c4778"]]},{"id":"a385d5a3.8744f8","type":"inject","z":"86416040.3b86f","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"auto","payloadType":"str","x":90,"y":71,"wires":[["e28bde86.5c4778"]]},{"id":"4a3ca2b2.4fd384","type":"inject","z":"86416040.3b86f","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":90,"y":111,"wires":[["e28bde86.5c4778"]]},{"id":"e28bde86.5c4778","type":"bigtimer","z":"86416040.3b86f","outtopic":"radiator","outpayload1":"on","outpayload2":"off","name":"Nattesænk - øvrige","comment":"til at sænke om natten og hæve før vi står op","lat":"57.0281759","lon":"9.952779","starttime":"1320","endtime":"330","starttime2":"1320","endtime2":"330","startoff":0,"endoff":0,"startoff2":"","endoff2":"","offs":0,"outtext1":"natsaenk_start","outtext2":"natsaenk_slut","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xday7":"","xmonth7":"","xday8":"","xmonth8":"","xday9":"","xmonth9":"","xday10":"","xmonth10":"","xday11":"","xmonth11":"","xday12":"","xmonth12":"","xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":341,"y":197,"wires":[[],[],["4ce77012.b6c398","ff923432.d9bfb8","c63ac009.7e22","7ee9fb0e.862bac","d9e0bde7.91f1f8","8aa1ce24.a05668","4596463e.0254d8","c155e59a.e0a6b"]]},{"id":"4ce77012.b6c398","type":"change","z":"86416040.3b86f","name":"payload set_kælderværelse","rules":[{"t":"change","p":"payload","pt":"msg","from":"natsaenk_slut","fromt":"str","to":"{ data: { \"entity_id\": \"climate.kaeldervaerelse\", \"temperature\": 21.5 } }","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"natsaenk_start","fromt":"str","to":"{ data: { \"entity_id\": \"climate.kaeldervaerelse\", \"temperature\": 18.5 } }","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"dagsaenk_start","fromt":"str","to":"{ data: { \"entity_id\": \"climate.kaeldervaerelse\", \"temperature\": 18.5 } }","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"dagsaenk_slut","fromt":"str","to":"{ data: { \"entity_id\": \"climate.kaeldervaerelse\", \"temperature\": 21.5 } }","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":699,"y":43,"wires":[["7e4a9732.9aad1"]]},{"id":"7e4a9732.9aad1","type":"delay","z":"86416040.3b86f","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":936,"y":42,"wires":[["de67e84f.d0074"]]},{"id":"de67e84f.d0074","type":"api-call-service","z":"86416040.3b86f","name":"reguler radiator","server":"35bd3768.bca1","version":5,"debugenabled":true,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"payload","output_location_type":"msg","x":1177,"y":244,"wires":[[]]},{"id":"35bd3768.bca1","type":"server","name":"Home Assistant","version":2,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]