From A to B only - Node-red

Hi,
I want to create a flow in node-red that starts when a specific state from an entity change from A to B and only that way. For example my security system as 4 states, I want the flow to start only if the state goes from armed to disarmed and ignore if already there or if goes to disarmed from another state.
Is it possible?

Thanks in advance.

You can use the trigger: state node and include two conditions - one where “previous state” is “A” and another where “current state” is “B”.