In my bathroom, I would like to manually turn the fan on with a smart switch but then it automatically turns off 30 minutes later. I looked at Smart Lightning and also creating a routine but did not see an option for turning off a switch in X minutes.
I went through these steps and it does work. I think one of the directions was backwards but I figured it out. Then I realized that I could make this work just using “power allowance” as prjct92eh2 suggested. Bad name for timer. Oh well.
But now I’m wondering what else can be used with a virtual switch. Interesting.
In a timer situation, the biggest advantage of using a virtual switch is that you can then also turn on the regular switch in other ways without it turning itself off automatically. That is, you only apply the power allowance restriction to the virtual switch.
A common use for this is a porch light. You could have the virtual switch come on when you arrive home and turn itself off again five minutes later. But if you were going to be working in the yard and you wanted to turn the light on and leave it on until you turned it off again at the switch, that would still work as well.
If you just applied power allowance to the actual porch light, it would keep turning itself off every five minutes no matter how you turned it on.
We used to use virtual switches for all kinds of things, but now A lot of the things we used to do with virtual switches are done with webcore instead. But for a simple timer, a virtual Switch may be faster and easier to set up.
But virtual switches still have their uses, particularly for integration with other systems, even echo and google home.
Subscribe to SmartThings Developers newsletter for the latest news and events: