Use number helper as automation trigger duration

Try a state trigger, not a device trigger.

In fact try to avoid using device triggers, conditions and actions altogether.

See: What happens if I have to replace a device - #2 by tom_l