Output of current state based on input number

Hello All,

I’m working for a couple days now with Node-Red. But I think I could not figure out.

I take the current state of a sensor (flow meter). And want to compare it with an entity input_number. If it’s below that input value it needs to be true. But it not seems to work, its not using the input number.
When I put the unput_number on a current state and attach it to a debug, the value will come up.

Can somebody help me with this?

Does this helps ?

thank you. It looks like it works.

The only thing is that he will use the value only for a couple seconds after in trigger to send the values where he needs to compare with.
Can this be done easier?

Sorry but I don’t understand what you mean.

when i make a current state node with msg.payload1. The value of this msg will only be use for a couple of seconds to compare with. afterwards he doesn´t compare with anything

The current state node must be triggered by it’s input connector.

You should probably use an “events: state” node that will send the state each time it changes.