When Light is Turned on for X Minutes / Hours

Hi. Is there any way I can set automation to run based on how long the state is happening.

For Example, I want to check if Light Group Toilet is ON for 5 minutes. And if it is, then turn it OFF.

Some automation platforms have this built-in, like SmarThings, where you can RUN automation based on for “Stays this status for how long”.

I tried to do this in Hue Essentials, as I have all my Automations there, but this is the closes I got:

The problem is that it will always turn OFF after it was ON for 2 hours, regardless if the light was turned OFF and ON multiple times between that time.

My use case for this is that lot of the time, I forgot to turn off the garage or toilet light, and I just want this Automation to check if I forget to turn it off and if it’s just for more than 2 hours with no change in state, just to turn it off.

Thanks for reading, I hope it makes sense :smiley:

UPDATE: Actually I found it is possible. It just does not work in Groups. If you set it up on Actual light, there is a timer that works the way I described it. Perfect! Hope this helps someone looking for the same things :slight_smile:

The only “problem” is that I do see this “Device specific automation” in the Automation tab. Thats a little annoying. But just I minor issue.