You specify a message to pass through like this - you were very close.
See how payload replaced your number?
We get that payload by using the Current State node (there’s also a way to do it through global context but this is easier for basics.)
It’s very important to note here that as far as Node Red is concerned - unless you specify otherwise ALL states coming out of HomeAssistant nodes are strings unless you specify otherwise. This is one of those cases where it’s important. In the node above where we set the curtain - it’s expecting an Integer. And WILL ERROR if you send a string. String “0” is not 0… So we have to handle that. I chose in my example to set the output type for the Current State node to NUMBER which will handle the conversion for me and spit out a number. That’s a non default selection. You could also choose to handle the conversion some other way.
What am I pulling state FROM? This is reading an input_number helper:
So the net effect:
The inject node is just a trigger, which causes the state of the helper to be read - and set the curtain position to whatever number is currently set in the helper’s slider…
To read the state of the curtain you would also use a current state node.
Also for future questiosn when doing Node Red, post your code as follows:
[{"id":"f8d80a4791128aed","type":"api-call-service","z":"82c92ecd79347931","name":"Set Curtain Position","server":"79f56aab.e0b7b4","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_position","areaId":[],"deviceId":[],"entityId":["cover.office_curtains"],"data":"{'position': payload}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":160,"wires":[[]]},{"id":"dd0ca319c9443838","type":"inject","z":"82c92ecd79347931","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":420,"y":160,"wires":[["9abf0980f0ad2958"]]},{"id":"9abf0980f0ad2958","type":"api-current-state","z":"82c92ecd79347931","name":"Get Curtain Setpoint","server":"79f56aab.e0b7b4","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.curtain_test","state_type":"num","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":600,"y":160,"wires":[["f8d80a4791128aed"]]},{"id":"79f56aab.e0b7b4","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"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}]
It makes it much easier to help you as opposed to a bunch of static images…
Good luck.