Is there any app that will detect a light being on and then turning it off after a predefined period? The light in question will be smart bulb which will get turned on via a light switch
There are multiple ways to do this.
If you want the light to always turn itself off after X minutes, you can just use the “power allowance” feature in the regular smart lighting smartapp.
If instead you want to use a virtual timer in some situations but have the light come on and stay on until it is manually turned off in other situations, you can just use a virtual timer. See the how to article in the community – created wiki.
http://thingsthataresmart.wiki/index.php?title=How_to_create_a_virtual_timer_for_a_light
If you’re asking for a means of detecting that a light has been turned on through some other control method that is not visible to smartthings, that can also be done, it Depends on exactly what you need and whether you want it to always turn off after X minutes or again only in some situations.
I have this exact setup for my master closet. Its a dumb switch with a smart bulb. Just like @JDRoberts suggested I use the built-in SmartThings Lighting Automation smartapp and set the “power allowance” feature to turn it off after 10 minutes. The little qwirk in this setup though is after getting turned off by the smartapp the wall switch is still in the “ON” position therefore to manually turn on the light, you need to toggle the switch down and then back up to “ON” to get the light to come on. It’s only a minor annoyance.
Great thank you both!