Separate or one rule, question

Greetings everyone! First post! Just got my Hubitat up and running with a single Zigbee bulb! Woohoo!

My question is....I want the bulb to come on at sunset -30 minutes, and then turn off at 1:00 AM, which seems easy enough to setup.

All the videos and posts I see, it seems like everyone is setting that all in one rule. Would this not be better served in two separate rules, one to turn the light on at the desired time, then one to turn the light off at the desired time?

And I guess this question partly comes from not understanding how the rules work, internally. It "feels" like having the one rule turn the light on, then wait 8 hours to turn the light off, would have that scheduled task running for those 8 hours, waiting to turn the bulb off. Where two separate rules would free up cycles on the Hubitat for those 8 hours.

Thanks in advance,
Stan

Nah, it doesn't do anything during that time. What happens is that an entry is made in the hub's system schedule table (database table) for that time. This would happen with either approach, because you'd use 1:00 AM either way -- and that's what goes in the table with a link to the rule to wake up.

Whether or not to use one rule or two (or more) does become an interesting subject as you get further along with using the hub. But, for something simple, it really doesn't make much difference how you do it. You'll find that there are multiple ways to do most things, and you'll have fun figuring out what works for you. It's a learning through experience process.

5 Likes

So, I was kind of picturing a script is running with a "wait", for the amount of time? If that's not the case, sweet! Thanks for the fast response! And Happy New Year!

Yeah, nothing ever just sits around spinning its wheels. 'Wait' really means 'I'm going to sleep now, wake me up when there's something to do'. That's literally what happens. Everything is event driven.

Have a good holiday!

6 Likes

If your new to HE and I read the OP correctly, this is the start of your learning curve. Lean on HE for automation and don't get caught up too much early on in 'load' to the HE. it performs well.
Long term, keep your autonations organized, minimize rules as they get out of hand over time. rely on apps whenever you can as they will help keep the rules down to a dulll roar. thats just my opinion fwiw, which isn't much.

1 Like

Maybe tangentially related, but is "wait" preferred over "delay"? I seem to remember that.

Robert added a helpful Tip about this to the RM documentation - click this link, and that Tip will be in the blue box that comes up.

I still review this info to refresh my memory anytime I'm messing around with waits/delays.

2 Likes

Yep! Still trying to get my feet under me with this, after using Apple Home Kit for a few years.

And yeah, so far I'm having better luck/performance with the rules all separated out.

Also...."HE"?

HE = Hubitat Elevation

2 Likes