Rule Review (er)

As I've become more and more embedded into HE, I still consider myself a neophyte. Things I originally setup which were generic and basic have evolved and changed and don't quite work the way I want anymore. Where previously I used simple automations like 'Motion triggers light on' - now I've got more complex rules doing the work... sort of.
As a case in point, the bathroom lights are now set to be different levels during different times of the day - with different off times - and a second sensor to keep them on longer if I hop in the shower.
Truth is, it doesn't work very well.

Why? Because I suck at rules. I apply logic more based on how I learned code 30 yrs ago vs understanding how HE functions work, like Delay vs Wait.

I've got 15-20 rules now and most of them are fairly simple. BUT... Wouldn't it be great if we had a rule review Category in the HE community? A place to learn but also a place to get outside help?
I would love to have Community help on about 5 rules and I bet there are others just like me to embarrassed to ask... :slight_smile:


If you post 'em either here or in the RM section I'm sure someone will be glad to give you feedback.


I’ll second @brad5’s suggestion. There is a Rule Machine section in the forum where a lot of people ask for help with their rules. There’s usually always a few of us that are more than happy to help others with their rules.

I would strongly encourage you to create a post in that section where you specify your requirements and post your curent rule.


In addition to what was said above, have you tried [RELEASE] Lights on Motion Plus (dim before off, remember individual bulb states, etc.) - #68 by bertabcd1234

I believe it has all the settings you put forward in your post above.

1 Like

It may be just me but I seem to have a similar issue. My solution is for the more complex rules to sketch out a flow like chart. Then I write my rule in a text editor to be sure my implementation follows the logic. Something like this...

1 Like

For me I just use built in motion lighting app and enabled "don't turn off if already on" so when I go in for a shower I just turn them on manually.


People do this all the time in the Rule Machine forum category. There’s even a “rules examples” sub-category.


There is something to your point here, whether you are 30 years ancient, or totally new to programming.

I'm not sure the low level logic is different per se, it's more the overriding methodology of how things process/trigger/are evaluated and listened to compared to back then. It's not the single process straight line/sequential construct everything was viewed through. Concepts like Event Driven Programming changed a lot of the approach.

Actually, while it might be rudimentary for Hubitat staff, it might be useful to put together a video addressing the high level way-to-think about "how HE functions" and building Rules within that framework.

Wouldn't want an entire CS course... but old time programmers and non-programming new comers needing to roll up their sleeves in this environment might benefit from an overview of the engine.

For many in this Community I am sure this would be a yawning walk through concepts they've already gained on the job or in school.

Oh, and while this is totally off topic, gasp.... HAPPY NEW YEAR to all !

1 Like

You're absolutely right. A lot of folks get hung up on the whole concept of "event driven."

1 Like