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: https://amzn.to/2CcVVWf ) 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.