Help using Template in a call service node

Trying to do this service call in node red.

service: climate.set_temperature
data:
  temperature: "{{ states('input_number.study_radiator_set_temp_value') }}"
target:
  entity_id: climate.study_radiator_valve

This works from the “developer tools” but can’t work out how to format the data section in the node red call service node.

If I use a fixed number instead of the template it works

[{"id":"89e4358e0ca3c788","type":"api-call-service","z":"878e74c2.7f39c8","name":"","server":"9405c3fe.d0a6c","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.study_radiator_valve"],"data":"{\"temperature\": $number($entities(\"input_number.study_radiator_set_temp_value\").state)}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":340,"wires":[[]]},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

Thanks that works great.

Can I ask if you can help with also using this in a current state node. I want the if state to be the state of input_number.study_radiator_set_temp_value

[{"id":"8fdb7432de512a9f","type":"api-current-state","z":"b3e0d080.4aac7","name":"","server":"9405c3fe.d0a6c","version":3,"outputs":2,"halt_if":"$number($entities(\"input_number.study_radiator_set_temp_value\").state)","halt_if_type":"jsonata","halt_if_compare":"is","entity_id":"","state_type":"num","blockInputOverrides":true,"outputProperties":[],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":3260,"y":180,"wires":[[],[]]},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

Thanks for the reply. Unfortunately this does not work as I want I think this was my misunderstanding

The entity is a climate entity and so its state is off or heat_cool and so can 't be compared to the value of the input value.

I need to compare the input value to an attribute of the climate entity (Temperature).

Can this be done.

For this particular case:

[{"id":"9a69943d77b9e6e9","type":"api-current-state","z":"b3e0d080.4aac7","name":"","server":"9405c3fe.d0a6c","version":3,"outputs":2,"halt_if":"$number($entities(\"climate.entity\").attributes.temperature)","halt_if_type":"jsonata","halt_if_compare":"gt","entity_id":"input_number.study_radiator_set_temp_value","state_type":"num","blockInputOverrides":true,"outputProperties":[],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":4360,"y":160,"wires":[[],[]]},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

If you ever need to compare two attributes, temperatures from climate.entity_1 and climate.entity_2 in this example:

Longer, more visual approach:

[{"id":"bb44b8b0d5cb4cc2","type":"api-current-state","z":"b3e0d080.4aac7","name":"get attributes entity_1","server":"9405c3fe.d0a6c","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.entity_1","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"data_1","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":3940,"y":1320,"wires":[["35d110ee685f2093"]]},{"id":"35d110ee685f2093","type":"api-current-state","z":"b3e0d080.4aac7","name":"get attributes entity_2","server":"9405c3fe.d0a6c","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"climate.entity_2","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"data_2","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":4160,"y":1320,"wires":[["e8024c713b7067eb"]]},{"id":"e8024c713b7067eb","type":"switch","z":"b3e0d080.4aac7","name":"compare","property":"data_1.attributes.temperature","propertyType":"msg","rules":[{"t":"lt","v":"data_2.attributes.temperature","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":4340,"y":1320,"wires":[[]]},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

More compact approach:

[{"id":"705b9434134c212b","type":"api-current-state","z":"b3e0d080.4aac7","name":"","server":"9405c3fe.d0a6c","version":3,"outputs":2,"halt_if":"$number($entities(\"climate.entity_1\").attributes.temperature) < $number($entities(\"climate.entity_2\").attributes.temperature)","halt_if_type":"jsonata","halt_if_compare":"jsonata","entity_id":"climate.entity_1#","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":3990,"y":80,"wires":[["e6d132be4b1504b8"],[]]},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

May I ask which is the general intention of the flow? How it works? Perhaps there could be a better approach than the ones described above.

If you could post what you got so far, with actual entities and such, that’d be really helpful

Thanks for the help. Restricted to my phone for now but will get you some details on the flow and look at you node details tomorrow.

As for the function of the flow then here we go.

I am using TRVs with the Tuya app and integration. Unfortunately the Tuya integration seems to have a known issue with not always retuning the updated data which is a problem for my other automations This can be fixed by reloading the integration.

The flow I am creating is to set the temperature of the TRV wait 10 seconds and check it has been set. I check every 10 seconds for up to 5 times I try to resend and check it is set. If after the 5 trys it still failed I call the service to reload the integration.

Hope this makes some sense.

I will say the my flows are quit scatty and can almost certainly be improved.

Ok so a couple of things then…

Regarding integrations in general, every time I found issues with an HA integration I’ve been systematically migrating that integration from HA to NR whenever possible (Spotify, Tado, Tuya, Alexa media player, Alexa virtual devices, Alexa home and Roborock in my case). There are not as many integrations in NR as in HA but I’ve found them to be way more reliable. In NR you are generally dealing with the API itself instead of with some dev’s integration. They are more difficult to set up and use but far more reliable in the long run. On top of that, if it ever craps out, which has very very rarely happened to me during this las 2 years, you only need to update a single integration instead of the whole system with the potential problems that may cause.

Regarding tuya, I had problems from the very begining, moved to NR and never had an issue. Once it is set up correctly it’s set and forget and I have somewhere around 10 tuya devices at home. The integration works locally unlike the official HA integration.

Once you post your flow’s information I’ll be able to help you further with that.

So here are the flows to set the raditor valved to a set temperature at the moment this uses hard coded values of 18 for the set value but this is what will be changed with the information you have already provided to use the input value entity.

The flow used the following entities

input_boolean.study_radiator_on_off
climate.study_radiator_valve

I have several valves in different rooms and the input_boolean indicates if the heating sould be on in this room.
This is controled by some other automations to allow different room combnations and request heat from the boiler. (this works well)

Climate is the radiator valve which is controled through tuya.

If the valve is requested to be on the counter is tre set and it tries to set and check the valve 5 times before sending the debug message (to be replaced with the service to reload the tuya integration)

[{"id":"cd01172c785acc0a","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"805231ca60969fa4","type":"api-call-service","z":"cd01172c785acc0a","name":"Study trv set temp","server":"db0ede28.3ef47","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.study_radiator_valve"],"data":"{\"temperature\": 18}","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":510,"y":200,"wires":[["cfbbad871d25ea63"]]},{"id":"bcb0c841a7535880","type":"api-call-service","z":"cd01172c785acc0a","name":"Study trv set off","server":"db0ede28.3ef47","version":5,"debugenabled":false,"domain":"climate","service":"set_temperature","areaId":[],"deviceId":[],"entityId":["climate.study_radiator_valve"],"data":"{\"temperature\": 6}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":480,"y":480,"wires":[["55432f3aedbe6646"]]},{"id":"8e81eb2ab2a59af3","type":"server-state-changed","z":"cd01172c785acc0a","name":"Study rad on/off","server":"db0ede28.3ef47","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.study_radiator_on_off","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"5","forType":"num","forUnits":"seconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":220,"y":120,"wires":[["805231ca60969fa4","7cc2daa88793497c"],[]]},{"id":"7dcb3d1c5b5722ed","type":"server-state-changed","z":"cd01172c785acc0a","name":"Study rad on/off","server":"db0ede28.3ef47","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.study_radiator_on_off","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"5","forType":"num","forUnits":"seconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":220,"y":380,"wires":[["bcb0c841a7535880","610e2f5cc631e57d"],[]]},{"id":"cfbbad871d25ea63","type":"delay","z":"cd01172c785acc0a","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":700,"y":200,"wires":[["04910f986456cfea"]]},{"id":"b5b2674ff013fce2","type":"api-current-state","z":"cd01172c785acc0a","name":"Study TRV current state","server":"db0ede28.3ef47","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"climate.study_radiator_valve","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1130,"y":200,"wires":[["7ee03fa8b4c4eb4f"]]},{"id":"7ee03fa8b4c4eb4f","type":"switch","z":"cd01172c785acc0a","name":"","property":"data.attributes.temperature","propertyType":"msg","rules":[{"t":"neq","v":"18","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1350,"y":200,"wires":[["b5c9c9c81e2ed351"]]},{"id":"b5c9c9c81e2ed351","type":"counter","z":"cd01172c785acc0a","name":"retry Count","init":"0","step":"1","lower":"","upper":"5","mode":"increment","outputs":"1","x":1570,"y":200,"wires":[["a8cc4d6877902191"]]},{"id":"a8cc4d6877902191","type":"switch","z":"cd01172c785acc0a","name":"","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"5","vt":"str"},{"t":"lt","v":"5","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1790,"y":280,"wires":[["4256c71f8a1a44f2"],["805231ca60969fa4"]]},{"id":"7cc2daa88793497c","type":"function","z":"cd01172c785acc0a","name":"msg object","func":"msg.reset = true;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1350,"y":120,"wires":[["b5c9c9c81e2ed351"]]},{"id":"04910f986456cfea","type":"api-current-state","z":"cd01172c785acc0a","name":"Study rad on","server":"db0ede28.3ef47","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.study_radiator_on_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":890,"y":200,"wires":[["b5b2674ff013fce2"],[]]},{"id":"55432f3aedbe6646","type":"delay","z":"cd01172c785acc0a","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":700,"y":480,"wires":[["0adacc97960e1b1e"]]},{"id":"7e219726b134c5c8","type":"api-current-state","z":"cd01172c785acc0a","name":"Study TRV current state","server":"db0ede28.3ef47","version":3,"outputs":1,"halt_if":"","halt_if_type":"jsonata","halt_if_compare":"is","entity_id":"climate.study_radiator_valve","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":1130,"y":480,"wires":[["4e8eb54f35bae380"]]},{"id":"4e8eb54f35bae380","type":"switch","z":"cd01172c785acc0a","name":"","property":"data.attributes.temperature","propertyType":"msg","rules":[{"t":"neq","v":"6","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1350,"y":480,"wires":[["983ad9cbba8dbbb1"]]},{"id":"983ad9cbba8dbbb1","type":"counter","z":"cd01172c785acc0a","name":"retry Count","init":"0","step":"1","lower":"","upper":"5","mode":"increment","outputs":"1","x":1550,"y":480,"wires":[["e0fa5f68756d8b0c"]]},{"id":"e0fa5f68756d8b0c","type":"switch","z":"cd01172c785acc0a","name":"","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"5","vt":"str"},{"t":"lt","v":"5","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1770,"y":560,"wires":[["f09e7dea6482ff7a"],["bcb0c841a7535880"]]},{"id":"610e2f5cc631e57d","type":"function","z":"cd01172c785acc0a","name":"msg object","func":"msg.reset = true;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1350,"y":380,"wires":[["983ad9cbba8dbbb1"]]},{"id":"0adacc97960e1b1e","type":"api-current-state","z":"cd01172c785acc0a","name":"Study rad on","server":"db0ede28.3ef47","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.study_radiator_on_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":890,"y":480,"wires":[[],["7e219726b134c5c8"]]},{"id":"4256c71f8a1a44f2","type":"debug","z":"cd01172c785acc0a","name":"debug 22","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":2020,"y":280,"wires":[]},{"id":"f09e7dea6482ff7a","type":"debug","z":"cd01172c785acc0a","name":"debug 23","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":2020,"y":560,"wires":[]},{"id":"db0ede28.3ef47","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]

Can using node red with Tuya get the values back into the climate entity without the need for the integration.

Yes. Any change in the device is locally pushed through the nodes outputs, then with that info you can create entities in HA with the entity node. It might look a bit cumbersome at the beginning but it’s well worth the effort and no that hard after you set it up. You can ditch the integration.

In fact I had a very similar problem with a light with the tuya integration. It took like 2 minutes for the integration to realize the light had been toggled. Not a single problem sinced I moved to the NR integration.

With the NR tuya integration your flow should look something like this

[{"id":"2d2227e94e5cb568","type":"server-state-changed","z":"cd01172c785acc0a","name":"Study rad 5''","server":"db0ede28.3ef47","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.study_radiator_on_off","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"5","forType":"num","forUnits":"seconds","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":230,"y":780,"wires":[["e744d72a407c1740"]]},{"id":"e744d72a407c1740","type":"switch","z":"cd01172c785acc0a","name":"on or off?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":380,"y":780,"wires":[["c15db00f463d8fc3"],["dfb4bee8e7e4437c"]]},{"id":"d2002bb74094730d","type":"server-state-changed","z":"cd01172c785acc0a","name":"Temp change for 2''","server":"9405c3fe.d0a6c","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.study_radiator_set_temp_value","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"2","forType":"num","forUnits":"seconds","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[],"x":350,"y":720,"wires":[["c15db00f463d8fc3"]]},{"id":"c15db00f463d8fc3","type":"change","z":"cd01172c785acc0a","name":"Study trv set temp","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":760,"wires":[["e03fb529000afffb"]]},{"id":"dfb4bee8e7e4437c","type":"change","z":"cd01172c785acc0a","name":"Study trv set off","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":800,"wires":[["e03fb529000afffb"]]},{"id":"e03fb529000afffb","type":"tuya-smart-device","z":"cd01172c785acc0a","deviceName":"","disableAutoStart":false,"deviceId":"","deviceKey":"","storeAsCreds":false,"deviceIp":"","retryTimeout":1000,"findTimeout":10000,"tuyaVersion":"3.1","eventMode":"event-both","x":830,"y":780,"wires":[[],[]]},{"id":"db0ede28.3ef47","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

I added the input_number as a trigger too just in case you change the value manually. This way your heater will update its value.

You’ll have to figure out how to build the jsons in the change nodes in order the comunicate with your trv since it is device dependant. It’ll take some trial an error, but it’s really easy, I’ll be able to help if you need it.

I don’t think you’ll ever need to double/triple/quatruple check your trv to reload the integration and so on…

This look like a good start point.

I have looked at the tuya smart device node but can work out how to get the follwing info
image

I did follow the click here but got lost at the 3rd and 4th paragraph.

Can I get this info from the tuya IOT platform?

You should read the node documentation. This is in fact the tough part, getting those ID’s. Once you do it once it’ll be bread and butter.

If you click in here, this link will open up.