Hi,
I might be able to help with part of it.
The motion sensor is the main culprit of the bugs....it senses the movement, then re-triggers the macro each time. SO you need to add a loop (or condition to check if this macro is in use).
As part of the conditional on the macro, check to see if a flag is set, if not, run macro. (Choose a a flag number that makes sense to you...)
First step in the mnacro, after sensing movement, is to set the flag.
Then turn on lights and dim.
After 'x' number of minutes, turn off lights.
After another 'y' number of minutes, clear the flag.
Thus ends the macro and resets the system for next use.
Now about the part of starting the lights from low and dimming up... wish I knew how. I've tried all typoes of solutions, but no joy. I haven't tried the SH stuff... maybe I should.
Hope it helps,
TC