Node-Red redeploy triggers unwanted events

Hi all,

I have a simple flow to control my covers with a switch.

Basically this works perfect.
But when I redeploy the flows a state_change message is triggered.

Is there a way to block this initial event?

I read a lot about that in the forum but didn’t find a suitable solution.

In general I would like to have this flow stateless and should be triggered every time I really press a button. Reason is - I can stop the covers moving by sending the same value a second time. If I limit this to a real state-change this doesn’t work anymore.

Any ideas? Probably there is a counter node where I can reset the counter to zero at certain events and let messages pass after x received messages?