Turn switch off after set time?

Greetings,

Still the new guy trying to get up to speed.

First tow in the water with automations and I'd like to have a switch go off after a certain number of minutes every time it is turned on.

Going through the documentation it seems that maybe I should use Hubitat Simple Lighting. I don't find that app unfortunately. I do find Simple Automation Rules, which looks similar. Is this the vicinity I should be in? Can't find anything about off after a certain time.

Ideas as to how to do this?

And also, maybe some pointers about how to search for specific functionality? I've looked around but find nothing for this simple functionality.

Thanks in advance!

Simple Lighting turned into Simple Automations. I don't think it has a timer function.

I would try one of the following community apps. Both are available in the terrific Hubitat Package Manager app, which is also a community app. Package Mangager can install and do updates and it is an excellent way to find new apps and drivers.

Within package manager, there are a couple timer apps. These can also be imported manually if desired.

Simple Switch Timer

Auto Off

The other way to do this would be to use the built-in Rule Machine, but that is typically harder to use than one of these community apps that are purpose built for this function.

2 Likes

You can also do it via the Motion Lighting app, if your using motion as a trigger.

1 Like

Yep, forgot to mention that, thanks.

1 Like

Here is a simple Rule Machine 4 rule that should do the trick. I tried to keep it as simple as possible. It does require you to turn on and off the switch one time to sort of “prime the pump”.

3 Likes

Why trigger on the off event?

It’s the only way I know of to avoid having to use an IF-THEN statement. I was going for the simplest rule that included automatic cancellation of the OFF timer, should the light get toggled.

It is essentially the same but without that odd initial state.

Edit: I guess the switch should be in the actions, not the light. The logic is the same though.

Hmmm... you're using a virtual switch, which somehow would need to be activated... :thinking: For a user simply turning on a smart in-wall switch, I am not sure how your rule would help.

The OP requested how to make sure a switch is turned off after x minutes of being turned on. In my example rule, simply turning on the switch manually, will result in it turning off after a certain amount of time. It is a nice, clean, simple rule.

Thanks neon, just what I was looking for. Quickly sorted out Auto Off, which does what I want. Also installed Package Manager, but that'll take some time to understand in itself. Either way a great intro to external apps!

1 Like

Thanks to all who chimed in here. Some not immediately applicable, but gives me some notion of where to go for other things in the future.

2 Likes

That’s just the switch I grabbed for the mockup. Really doesn’t matter if it is real or virtual the rule would be the same.

Since there was some confusion here’s an example that uses the correct devices.

Doesn’t get any simpler than that. :wink: In any case, I’m glad the OP got it sorted.

1 Like