node-red-contrib-home-assistant
node-red-contrib-home-assistant copied to clipboard
Call service node replaces msg object
Describe the bug Similar to an issue related to the GetState node, already fixed: https://github.com/AYapejian/node-red-contrib-home-assistant/issues/15 , the msg object passed to the node is replaced by a new msg object. This also affects the msg._msgid property which I believe is not intended, as a new one is assigned after the HA Call service node.
This makes it difficult to make more advanced flows containing multiple nodes and long sequences.
I don't see why this node should be treated any differently than the GetState node.
To Reproduce Steps to reproduce the behavior:
- Create a timestamp node(To be able to start the flow), and then connect it to a new Function node, in which you add any properties to the msg object
- Connect it to a HA Call Service node
- Connect the output of the HA Call Service node to a Debug node(Display full msg object)
- Trigger the flow, inspect the debug message. Note that any properties added in step 1 is now missing
Expected behavior I expect to be able to put aside my own properties, and still have them in the msg object after calling an HA Call Service node. I also expect msg._msgid to be the same before and after calling the node, for tracking purposes
Other (please complete the following information):
- Have you searched previous issues for duplicates?: Yes
- Did you attempt to reproduce the issue in the dev docker environment, if so what were results (See README.md): No
Additional context