Node-Red: Stop Current State Node from overwriting message?

In Node-Red the current state node seems to be replacing the entire msg object. Is there a way of stopping this. So the current state node would check an entity_id for a state and if it’s true, pass on the incoming msg object. And not replace the msg object with the data and state from the entity_id in the current state node?

I have a couple of flows that I want to use the full msg object from a trigger node, not just the msg.payload form the trigger node.

I have a sample flow below that illustrates a bit more detail.


Having looked around, what I’m describing is the old behaviour of the current state node, but I can’t find any instructions of how to make the current state node revert to this functionality.

See the state location and entity location field on your screenshot.

You mean setting the payload and topic to None. Like this. Thank you @eggman

image

1 Like

Aye, that’s the trick

Has the mark solution button in Forum threads disappeared?

Did a search on the same issue I’m facing atm and this solution worked. Thank you!

However, I would like to understand the logic behind setting the location to none, if anyone can explain it please?

You can also set it to some arbitrary value. Just make sure its not the same as the previous message you want to keep.

1 Like