I have such a flow where x is set from a tag/variable. It works perfectly in one room, but not in another, and I am scratching my head why it is so. The room where is works has a Hue motion sensor, and the other room has an Eve motion sensor.
“When zone has been inactive for x minutes” proofed to be randomly unreliable (Pro 19).
That’s why I use an additional timer along with the “Zone became inactive” trigger card.