Rule starts even if trigger doesnt change

Hello everyone,

I'm very new to node red. I was running my smarthome on Openhab but now moving to Home Assistant. I was told to directly start creating rules with node red instead of the integrated rule engine.

I have a basic understanding of the nodes but there is something very strange in one of my rules. It is a rule which changes the lighting of different stuff in my office based on the status of 3 different power outlets. The rule itself works fine but very often the rule fires again even if nothing changed. So the lights go out for a second and than go back into the status they had before. From my point of view the configuration should be correct and for unchanged status nothing should happen.

Thats the rule and you can see also the configuration.

Any idea why this is happening?

I'm also quite sure that the rule itself is unnecessary complex but as i said I'm very new to node red.

can you paste the output of that events state HA node

Look at the entity's history in HA and see if it's state is going to unavailable or unknown.

Unfortunately it looks like I'm to new to node red... so I don't know how to do this :frowning:

Yes it looks like you're right. Lots of my entities are based on my KNX installation. I noticed that every few minutes all my KNX devices become unkown / unavaialbe and than returen again. So really every device and every entity... thats strangs.

If it happens log viewer in HA says this:

" 2025-01-22 08:26:35.464 WARNING (KNX Interface) [xknx.log] Received DisconnectRequest from tunnelling server.2025-01-22 08:26:40.666 WARNING (MainThread) [xknx.log] Error: KNX bus did not respond in time (2.0 secs) to GroupValueRead request.... "

And in the device / entity log it looks like this for the tunnel that connects HA and KNX.

I am certain you realise, but just to be clear, Node-RED is NOT Home Assistant. In fact the majority of folk here do not use home assistant at all so will not know a great deal about things like "history in HA". There is a HA Discourse forum - you may get better assistance there.

However, from the Node-RED side of things, you could probably control all of your KNX equipement without HA - there are some ready made nodes and flows in the catalog: Library - Node-RED


Then may I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Yes I know that node red and HA aren't the same or better said that a node red user is not automatically using HA. I was just hoping that a lot of you do :wink:

Overall of course I joint this community for getting help (and maybe at a later point) being able to help others with node red. So for me its majorly about node red and the rules to create with it but not about how node red works with HA. Unfortunately my first question / issues seems to be linked directly to HA. It looks like node red and the configuration is not really the problem HA / KNX interface is creating the problem.

But the feedback already helped. At least I found a workaround because changing the config of the event.state nodes to this.


should at least solve the issue for the moment... Of course this is not my final solution but it helps for calming down my wife :smiley:

I will check the articles / videos you've send me. Thanks

1 Like

Unless you are trying to catch the unavailable state, you should check all the boxes.