However, in this case it looks like the OP wanted to use this in the bathroom, presumably to have the light come on each time someone went into the bathroom, and go off 5 minutes after they left.
I suppose the motion sensor on its own could do this. To be honest, I don't know why the OP was trying to do this with a bunch of macros, instead of using the built-in time in the motion sensor. The thread doesn't give a reason for that.
If they want to only have it happen during certain hours (like only at night - perhaps there is a window that provides enough light during the day), then they COULD create a conditional macro, triggered by the "on" from the motion sensor, to turn the light on only if the right time window is met.
A matching "off" macro, triggered by the "off" from the motion sensor, could be used to turn the light off.
Still pretty easy.