Feature Request- RM Trigger Earlier of Two Times

Mode manager has a feature to trigger mode change based on the earlier of two times. So, for example, I can have evening start at 5:00pm or Sunset, whatever is earlier.

This would be an awesome trigger for a lighting rule I have and I have made something work, but it feels super clunky to me. If the trigger was available, that would allow me to clean up my rules. I have thought about setting the lights based on the mode, but then it would not work when my mode is set to away and that I want this rule to run independent of mode.

What is your current solution? I can't speak to the likelihood of this being implemented, but perhaps there is something less awkward than what you're doing right now. :slight_smile: (My first thought involves a required expression of private boolean true, setting it false first thing in your actions, and using a wait for event: time is 11:59 PM or similar before setting Private Boolean to true last thing in your rule actions. Yeah, a bit of work, and possibly something you'd need to do differently depending on what else this rule is doing and how it's configured, but in general already do-able.)

There is no need for a new feature to do this, as it is easy already.

Here's how:

Use both times as triggers of the rule. The rule simply only does anything the first time it is triggered, not the second. Then do this in the rule actions:

To do Later of Two Times is just as easy, simply reversing the logic above.


Thank you so much. The previous way I was doing this was to have 2 rules and just limit one to firing off only during a certain time frame. Like I said, it was clunky. But, this is elegant and solves my problem.

Your solution, with a little modification is what @bravenel suggested and it looks like it will work perfectly.

That's actually a good reminder to not get complacent in one's use (and TESTING) of Mode settings -

Day/Evening/Night for Away
vs Day/Evening/Night for Home
vs Day/Evening/Night for BOTH

...this differentiation is warranted for a lot things and I bet there are more than a few folk with rules that have been configured with a quick mode setting decision that would be tripped up by using Away and trusting all-to-be-right.

Download the Hubitat app