Events State Node pulls unwanted/extra entities when using substring filter

I have an events state node where I want multiple binary sensors to be able to trigger the node.

I’ve entered the following:

binary_sensor.patio_door, binary_sensor.entry_door

and selected substring instead of exact for the entity filter.

I have Output on Connect checked so that when I hit Deploy, I can quickly check to see what the output of the node is, since it doesn’t allow input.

I set a debug node right after it and then look at the entire message object. The problem is that two other entities that are not listed as entities in the node appear in the output:


This problem came up in the process of solving a different problem in another thread, so I figured it warranted its own separate post. Hopefully that’s okay - I’m new around here.

Here is my Node Red sequence.

Here is the documentation that I found that I think says I should be able to do it this way.

Here is a screenshot:

That is definitely from that flow? If you hover over the debug message, it highlights the node that it came from. What about the two entities in the node, it has no output for those entities?

That is definitely from that flow? If you hover over the debug message, it highlights the node that it came from.

Yes, for sure. Just moved it to a new flow to double check.

What about the two entities in the node, it has no output for those entities?

I get outputs for those entities when they switch to on (open the door) or if I hook up the debug node to the false output of the state changed node and re-deploy, as I have “Output on Connect” checked and since the doors are closed, they are reporting off.

What’s weird is that I get three additional binary sensors for the entry_door, but no additional binary sensors for the patio_door, but they are the exact same ZWave lock model and everything. And if I look at the devices in Home Assistant, they show the same number of entities under Sensors, Controls, and Diagnostic. (See screenshot below).

Could I have somehow bound a sensor with another sensor or something?

Go to dev tools in ha, in the template section enter {{states('problem_entity')}} It will give you back the current state. Does it show the extra values there on the right?

I checked them all and all I get is off for each one.

Could you try just deleting the node, deploy, then set up a new one, same settings and check the output. Maybe some stuck settings.

The other thing I don’t use output on connect so I don’t know that this isn’t something caused by checking that box. If it happens after the delete, uncheck that box and deploy.

Then the ghost entities, not defined in the node, change their states. See if the event state outputs the ghost event.

Yeah this is just weird. Deleted the node and started over, still the same stuff. HA and Node Red are both up to day (I believe there were updates today even). Restarted HA.

And originally I was thinking the issue could be happening because they are both entities created by the same device, but they aren’t! The door sensors are wired magnetic reed sensors that go back to a ESP8266 running

Maybe I’ll trying change the name of the door sensors completely or something and see what happens from there.

Do you know if you can manually change the state of an entity for testing purposes? Because I don’t know how to change the state of those ghost entities other than swapping out the batteries for dead ones or physically jamming the locks, so it makes it hard to test.

Developer tools set state.

You could change the friendly names, that way the entity names is not affected and all automations work but you can filter on friendly names instead with get entities.
Make the names “indoor/outdoor door ?:sensor?”
And it should be easy to filter with either regex or substring

EDIT nevermind about the get entities. I was not thinking correctly.
You need something to trigger for get entities to work, and you kind of don’t have that.