Contact Switch with Configurable Time

I have the sinking feeling this is a dumb question.

Is there an already existing virtual device that is a switch that will turn off after a configurable amount of time (config can be in the code).

I think the search terms are too generic to find me the specific thing I’m looking for…

If not off the top of someone’s head, I know I can code this when I have some time. But it has to already exist…

And related to this question: What is the most reliable physical contact switch (or method to implement a virtual one), that will turn on for a period of time, and then turn off (approx 1-2 minutes). I can do this virtually (in fact I made an app that scheduled an off and a safety off for a power plug, but that still makes me nervous (this is a backwash for a water filter). I’m turning on and off a 24volt transformer running on 120.

I am using the on/off button tile virtual switch and have configured it in the app to turn it off after 5 minutes. It works well for me.

1 Like

It’s in short cut groups: “turn off after a period of time.”

I think any switch will work for this, virtual or physical.

1 Like

I wrote my own custom app for this.

  • Turns off after a configurable period of time
  • If it turns off on you, turn it back on within x seconds and it will disable auto-shutoff.
  • Double-tap the switch’s on setting and it will prevent auto-shutoff.

I use it for rooms I’m usually in for only minutes at a time. Closets, garage, etc.
My source is available on git hub.

this app works like a bomb… only question is there any way of doing less than a minute… i am using a port to turn on and off a relay for my garage door… it only needs to be on for a few seconds… didn’t know if you had that answer??

I added support for a seconds component in my program. Enjoy!

you are awesome… I am impressed that even after writing this so long ago you still keep it updated… thanx man