Can't figure out how to change the "entityid"

Hi, I’ve been struggling with the following NodeRed issue lately, hopefully someone can help here:

I have the following flow:

And this is the output of the flow:

I really don’t understand why the “entityid” referenced in the output is: “input_boolean.at_home”. I need it to be: “input_boolean.at_home_mobile”, according to this screenshot right?

But somehow the initial entity I used in the flow is having some persistence. Any ideas?

Where are you setting the msg.entityid property? Judging from the screenshot, it looks like the function node might be setting it?

Well, “current state node” with the “Entity ID” field set should be enough for setting the Entity ID to: “input_boolean_at_home_mobile” right?

Instead, the entity_id seems to be “at_home” (coming from previous nodes).

image

image

you are moving entity location to flow.data