Pass INT from Node Red to HA Automation

i have an integer in node red and want to push it to an home assistant automation. Currently i am using counter.set_value to do so. This works find. But i have a Problem, when the value 4 and it set it 4 again i want to automation to trigger. But this does not happen since the counter does not change.

How can i “fix” this?

I thought on triggering the automation from node red direct but in this case it could run with old values of the counter when triggering to automation is faster then setting the counter…