Best way to turn off light after X minutes

This may make zero difference...but just wondering if any approach to do this is less CPU intensive.

If THIS LIGHT has been on for 30 minutes turn it off

Start a counter when it turns on and turn it off after 30 minutes

Some other type of do/while approach.

I don't want to trigger the light on with a motion sensor and turn it off when motion stops

THX

3 Likes

:+1:

I always include the word FAILSAFE in the name of a rule like that, so I know at a glance what it does.

One of my examples:

1 Like

I use auto_off (available in HPM).

Interesting I will take a look at this!

I'm guessing this approach is just fine...and straight forward.

The best way is the one that makes the most sense to you.

You don’t have to worry about the hub’s CPU load for an automation like the one you described, however you decide to implement it exactly.

1 Like

SO, whether the hub is waiting for an event or waiting on a timer it really doesn't make a difference to the CPU? Right?

I'm being a little overboard here...but if you had 20 different rules doing this...is that still true. IE - If another major/large rule ran during this period there would be no impact to processing? There would be no (and I forgot the exact wording) "multiple rules running" at the same time? ...as long as the others are all in a waiting state.