Hubitat Rule for Motion + Lux - Red Dimmer + 4 in 1

I have my Red Dimmers installed but plan to now go to the next step with the 4 in 1 sensors. I jumped on the pre-Order, so hopefully they’ll be here in April sometime.

I don’t want to do just Modes + motion as I have some rooms that are dark most of the time like a den with no windows and a couple of bathrooms. But, it is most of the time, not all of the time. So I can’t just say if it is M mode and motion detected. I’m using a Hubitat C7 hub and want to create a rule that says if Lux < L and motion detected and hours between Y and Z (which I could do modes I suppose for that part of the equation) then turn on Light Bulb B or Switch S to P %.

Can anyone point me to such a rule and/or post a screen shot of that?

Thanks,

It sounds like you just have a couple of nested IF conditions. Rule Machine is more than a little cumbersome to use, but you can definitely achieve what you want by checking each condition under one another using motion as the trigger. Inserting and managing conditional statements is something you just have to try and play with.

I don’t have a perfect example for you, but here’s an example of some nested conditional statements. This sends an alert to my phone only if the side gate has been left open for 2 minutes.

image

Thanks. I’ve been programming for about 35 years, albeit first in Xywrite, then Word Perfect, then VB and VBA since the late 90’s, but my point being I’m very familiar with If/Else/EndIf constructs.

What I was looking for was some idea on how to know how those actually got written. For example, if Lux is < X. Or if Motion = True or Detected. I just don’t know what the terminology is and for the lux value what what kind of scale it is.

Something like this should work:

I don’t question your ability to understand nested conditional statements, but trust me when I say that Rule Machine is cumbersome.

In your case, I would trigger your rule based on motion, then have it check mode, then time, then lux. You’ll really have to experiment with the latter because it’s dependent on the position of the sensor and doesn’t always correlate real well.

This isn’t exact either, but a little closer.

Probably need to add motion…I forgot to include that in the conditional action.

Thanks for all the help. I started with Rule Machine because I wanted to get used to it, but I’m just doing what the Button Controller is basically doing. Just going between those 2 it amazes me how different the steps are to do the same thing. Before I took the plunge I watched as many YouTube videos on them and knew that the UI can be challenging. It really needs a major overhaul. If nothing else, they need to get much, much, better about consistency in how processes work and terminology.