Node Red - state from "a" to "b"

Hi, what is the correct nod and way to configure a node to only trigger if a state is from “a” to “b”, where I can set a an b?

Can you be more specific about the application of the automation? You first need the state, whether it’s in the msg.payload, or the entire message object somewhere, then a switch node to test against that value. What are you trying to do?


Assume msg.payload is ‘a’ or ‘b’ or ‘c’. I want to only trigger is the state changes from a to b. Thus not from c to b or b to c or a to c.

Hope this is more clear …