How to track status of and conditionally trigger a multi-mode light?

Apologies if this is a simple task, but it's beyond what I've done in HE before.

I just installed a new downlight in my bathroom and it has a nifty built-in nightlight trim. (For those curious: ) The nightlight is activated by toggling the power to the light within 30 seconds. For example, if you turn on the switch, the normal light activates. If you turn it off and then within 30 seconds turn it back on, the nightlight comes on. If you repeat, it toggles between the normal and nightlight modes. If left off for more than 30 seconds, the light will then default back to triggering the normal light on the next power-on.

Now, I have this light on an Inovelli red series dimmer and I would like to be able to automatically go to the normal or nightlight mode based on some triggers (eg, motion plus time). My first thought is I need to track the current status of the light by tracking on and off commands and then resetting if left off for more than 30 seconds. I also thought I may end up having two virtual dimmers, one for nightlight level and the other for daylight level and setting the correct one based on status. My thinking is that then these virtual dimmers can be directly controlled and use RM to send the proper sequence to the Inovelli dimmer to mode switch if necessary and set level.

Am I missing some simpler way to do this? I tried to start setting this up but very quickly hit the limits of my understanding once the delays weren't working as I expected.

I'm not sure of any easy way to do this, at least not with the hardware that you have (the easy way would be a smart bulb where Hubitat can just directly send commands to and receive reports from the bulb; with this device, you're left to make your best guess). It sounds like you may have been pretty close but just had some problems with Rule Machine. If you're new, delays can be tricky (a general tip: they are not cancelled, even if your rule triggers again, unless you explicitly do). If you still have the rule(s), posting them here may give you some advice.