Changing time for rules

Okay,
I'm guessing this is a niche topic but maybe it'll help others. For years I've had 6 rules for 3 motion sensors controlling 3 separate rooms. Each rule had lights come on at either 100% during the day or 1% at night. For the longest time day was 6:00AM to 11:59PM and Night was 12:00AM to 5:59AM. When I started morning classes I moved it so it was 5:00AM to 9:59PM and 10:00PM to 4:59AM. Then, when those classes ended I chose to move back to the first set of times. It's taken me a couple weeks to realize one of the night rules was 6:00AM to 9:59PM and morning was 12:00AM to 5:59AM, leaving a 2hr gap. I finally figured out my error after replacing batteries, removing the sensor and adding it back. I only discovered the error when I was trying to be sure the sensor, given the same name it had before, was connected to the prior rules.

So, My question is this; is there a simpler way. I'll admit my rules are in the legacy version of RM. I don't know if I need the 1min gap in the times but that's rarely an issue so I don't worry. As I want my Livingroom, Kitchen and Bathroom controlled separately I know I need different rules for them. I'd really like to be able to change "Day" and "Night" in one place vs several but I know the rule has it's own time spots so I don't see a chance for a variable like Day being used.

Hopefully others have some input.

Not with Legacy RM, but you could use Hub Variables for the times. Then, changing the times in the rules is done just by changing the appropriate variable.

2 Likes

Would I just need to rewrite the rules in the updated rule machine? Also where do I make hub variables?

Hub variables are under Settings.

1 Like

Another rabbit hole to go down is looking into Modes if you havenā€™t already done so.

3 Likes

I would think that using Modes with Mode Manager would make things fairly simple for you. Mode Manager has a time table to automatically set the Modes. If you rules were based on Modes (i.e. Day equals 100% and Night equals 1%), any time you changed the time table in Mode Manager, it would update all rules to the new times.

1 Like

You don't want a 1 minute gap in your rules. Time between 6:00 AM to 12:00 AM is evaluated as true between 6:00.000 AM and 11:59.999 PM.

Just to add for completeness, Time is 6:00 AM is evaluated as true between 6:00.000 AM and 6:00.999 AM.