What I am looking for is to manually control the duration of the “for” part of the event:state node, based on other conditions, which I am going to capture through different nodes. Unfortunately, I see that this node has only outputs and no input, but maybe there some other ingenious way to do that?
Use a Global instead.
Click the Context Data icon in the upper right corner and then click the refresh icon next to Global.
You should now get a homeassistant object with all the HA states you can pull directly.