Rule actions triggered by motion sensors don't match "Run Actions" button results

I'm a new Hubitat Elevation user moving from Wink (isn't everyone?) and I've been programming since 1966, but this problem really baffles me.

I have lots of affected rules, but I'll demonstrate with just one. I have a Dome motion sensor in the bathroom and two generic (GE/Link) Zigbee lamps in the bathroom. During the day, I want the lights to come on at 100% brightness when I enter the room. At night, I want the lights to come on at 1%. At all times, when motion is no longer detected, I want the lights to go out after a one minute delay.

What I find is that, during the day, the lights come on at 1% and at night they come on at 100%. But if I hit the "Run Actions" button in either rule, the lamps come on with the appropriate brightness. If I look at my time-based conditions in both rules, during the day the time condition shows as True during the day, but the opposite rule actually runs.

The rule, "Bathroom on via sensor, night" has the opposite time range. As I say, this unexpected behavior is not confined to this rule as I have other sensors and affected devices.

Thanks in advance for any help with this.

in the select actions to run,
you need to select a conditional action
if (time between) then
dim

the manage conditions is the list of all conditions you have used or could use in conditional actions for this rule.

2 Likes

Got it! Lordy, that's convoluted! But I get it, now, and it all works.

Thanks,
Jeff

1 Like

Add an END-IF just to be polite, and you got it! :slight_smile: (RM will infer them where they can, and the end of the rule is certainly one of those spots, but it's still good practice.)

Something you also might consider instead is using modes in combination with the Motion Lighting app. You can set level per mode in this app (as well as RM and many other apps). If you plan on using the same mostly time-based conditions in other apps, modes might make this a bit easier, and Motion Lighting is a lot easier to configure than Rule Machine in any case (and likely a bit faster to execute since it's a smaller app; the tradeoff, of course, is less power since RM lets you do literally anything).

Just something else to consider!

2 Likes

I will add the END-IF. As for modes, they look intriguing, but not applicable to my eccentric lifestyle. I checked out the simpler apps, but being nerdy, I would like to learn the rules engine entirely. As for the size of the rules engine, in my setup, at least, I'm getting instantaneous response, just as I got from wink when it was in local mode.

Thanks,
Jeff