This is clearly a problem with my understanding, but I'm stumped!
I'm basically following the example in this node red documentation page, bottom of the section "Changing message properties", except I'm injecting a numerical value.
I am using a change node to 'copy' a value (i.e. msg.payload, received from an inject node) to msg.payload.target_temperature_c. However when I attach a debug node to output, it just shows the value I injected in msg.payload of the output, not in msg.payload.target_temperature_c.
End result: I want to be able to update my Nest thermostat with a value from a slider on dashboard... but this is the bit that's failing.
Here's my node. When I hit the inject button, I am hoping to see msg.payload.target_temperature_c as the value 19. (But I'm not)
[{"id":"d4e6120f.dc4ca","type":"debug","z":"a09201df.15c79","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1230,"y":780,"wires":[]},{"id":"fe5f46b2.f24778","type":"inject","z":"a09201df.15c79","name":"","topic":"","payload":"19","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":730,"y":780,"wires":[["35b88424.9a60dc"]]},{"id":"35b88424.9a60dc","type":"change","z":"a09201df.15c79","name":"","rules":[{"t":"set","p":"payload.target_temperature_c","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":780,"wires":[["d4e6120f.dc4ca"]]}]