It's not quite what you want, but if you want the lights to (more or less instantly) dim as a "warning" before turning off, this app I wrote will do that: [RELEASE] Lights on Motion Plus (dim before off, remember individual bulb states, etc.)
Again, this doesn't dim over time, though that's certainly an option I could add. (I'm still afraid I wouldn't actually be able to tell if the lights were just slowly dimming on me.) My intent was to imitate the Hue motion sensors that dim the bulbs before turning them off to help users coming from this platform who want to use Hubitat-native automations.