Turn off switch after being on for a period of time?

Hey guys

I’m trying to mimic having a timer on a bathroom fan switch. There seem to be a lot of apps made that will turn off a switch after it turns on the switch using an external source but I can’t find one like this.

Does anyone know of an app like that? If there is another app out there that is close enough, with it’s code open sourced, I should be able to modify it to make it accomplish this.

Any thoughts?

Power allowance is what you want.

1 Like

There are several ways to do this, it just depends on exactly what you’re trying to accomplish.

If you want this to happen every single time the switch is turned on, use the power allowance option in the official smartlights feature. That’s what it’s for. :sunglasses:

If you want to be able to sometimes have the light turn off on a timer and other times not, you can create a virtual timer. See the how to article in the community – created wiki. (This article will also show you how the power allowance feature works.).


If you want to do something more complicated, like have it turn on with the motion sensor and usually turn off with the timer, but if someone manually flips the switch have the lights stay on longer, the easiest way is to use core. You can think of core as a scripting language for SmartThings.

Thanks guys. It sounds like Power Allowance is exactly what I’m looking for…but now for the stupid question. Ya’ll talk about it as if it were built into the SmartThings app, but I don’t see it anywhere in the app.

I saw someone post the code for it, looks straight forward and I’ve put custom apps in before, but before I make extra work for myself. Is Power Allowance built into the SmartThings iOS app? Or is it a custom app?

Thanks again! It looks exactly like what I’m looking for

The screenshots with the exact steps for using Power Allowance are in that how to article. :sunglasses:

JDRoberts: I hate being so dense! I saw the same words used on another app that was looking for a power meter and got confused! Tried it out already and works perfectly!

I figured this had to be easy enough. Thanks!

1 Like

It sounds like you’ve found your solution, but I’m using SmartRules (paid app) to accomplish my “light timers”

1 Like

What other value do you get out of SmartRules?

SmartRules is popular for two reasons:

  1. it offers a simple graphical interface for setting up automation rules

  2. it lets you set up “do while” conditions. It’s not as powerful as Core, but it’s much easier to use.

Check the “features” at the bottom of the company’s page and you’ll see what options are available.


I use SmartRules often, but it hasn’t been updated in awhile so still missing functionality.

What @JDRoberts said! haha It’s super simple to use and gives you more control than some of the stock smartapps. Definitely not as powerful as Core, but not nearly as complicated to setup.

1 Like

Okay can someone please save my sanity… nothing in this thread makes sense… WHY is this so hard to do?

I want my Downstairs bathroom light to turn off after 15 minutes being on. I have created a virtual switch called “Timer” the i set up a smart light (NOT SMART LIGHTING as you all keep saying) then i set the power restriction to 15 minutes. Then this Wiki article spells nothing out its jsut like do step C and i wont tell you how you get to step C.

Why is this so hard? And the app you link to is for iOS only and I am on android!

Please can someone tell me how to make my light turn off after 15 minutes that’s easy to understand and does not requires making virtual switches and routines and the need to follow other switches… man there is nothing smart about this hob its like it was designed in the stone ages and has zero features. You have to be a NASA engineer to figure half this stuff out that should be so simple!! How do they expect the normal person could figure this stuff out??

Please any help?

Use the Smart Lighting automation and setup a power allowance. I have several setup to turn off various fans and lights with different time frames.

Smart Lighting
Select - New Lighting Automation
Select - Which devices do you want to control?
Select - What do you want to do? -> Turn Off
Select trigger - Scroll to bottom - Select Power Allowance
Enter - After this number of minutes
Touch “Next”
Edit Automation name (Optional)
Touch “Done”