Delay. - Here is Circuit Schematic Dome Light Dimmer with Delay using LM258N. There are two stages: first one is delaying and the second one is fading. When you open the door the light turns on. You get inside and close the door, but the light stays on (delay stage) for an adjustable period of time (0-40 sec. for the values in the scheme, but you can easily modify that i.e. put a bigger capacitor) so you can see where to insert the key or do whatever you do when you get in the car, then fades away (fading stage) with an adjustable speed. If you connect the ACC wire (which is entirely optional) when you turn the key to ACC position the light turns off (actually fades) even if the delaying stage is not over (it cancels the delay stage).
Setup The SR1 trimmer pot adjusts the delaying time (the period that the bulb is at full intensity) and you have a “witness” LED that is lit during the delaying stage; that way you can set it visually to whatever duration you like. When the first stage ends (marked by the LED not being lit anymore) enters the second stage – fading. The SR2 trimmer pot adjusts the fading time (or speed if you prefer).