I donāt know if you looked or not, but there already is a Finite State Machine node for Node Red (https://www.npmjs.com/package/node-red-contrib-state-machine). If it didnāt suit your needs, then it is better to ask for changes to be made than create a new one.
One thing you need to be careful about using the inject node to set the configuration of downstream nodes is that the inject node does not fire immediately at start up. This may result in a period where your dsm node is receiving inputs but is not configured.
I tested your node and I also asked you for a new feature but unfortnally first I didn't get an answer and had to ask again and the second time there was no answer at all!
But anyway I like node-red and its ability to create new nodes.
Fair enough. Sorry, I hadnāt connected your two accounts together. Yes, you did ask for a change. Just remember that like many contributors, we do this in our spare time and donāt always immediately respond. The change your were proposing had a potential complication that meant that it may not always work as you expected and I put it on the to-do list to look into it more closely when I had time.
I did actually search for a state machine node before I wrote mine. Interestingly, the node-red-contrib-fsm node didnāt show up because description doesnāt actually contain the term āstate machineā. There is a lesson in that for all of us.