As above, I've found that it won't work under these conditions too:
The interior air temp is a lot different to the temp specified on the climate control
The engine isn't up to temperature
Your seatbelt isn't on
The brake pedal isn't pressed
A DPF regen is taking place
The manual says other specifics too, like:
If the car is at a steep angle
If the steering wheel is turned to much (in the auto A4, turning the wheel when off started the engine.
The car determines the battery charge is too low or there is too much draw on the battery.
It's quite clever in the things it checks to see if it's safe to turn off.