I think most people can agree that the normal sequence of modes is Morning->Day->Evening->Night, and that there's no good reason to reverse that flow. If I'm wrong, please correct me, but that's the way I've always looked at it. Anyway, I discovered a situation where modes can go "backwards" if you're not careful. Here's the scenario:
- RM rules to manage what happens when mode changes are triggered by mode changes (and restricted so that they only run if the mode is correct),
- Mode changes are set to occur at certain times in Mode Mgr, and
- Modes changes are set to occur when certain switches turn on, again in Mode Mgr.
The functional goal is to allow the flexibility to change modes "manually" with the switches, while at the same time automating the mode changes if no one intervenes. For example, hub mode changes to Morning at Sunrise+30 or when Morning Mode switch turns on, and Day 30 minutes later (or "manually" at some time before that, with its own switch), regardless of when/how the Morning transition was triggered. What I found recently was this:
- I triggered Morning mode at 6:15 via the switch, which puts the Hub in Morning mode via Mode Mgr's switches table, which causes the Morning rule to run, which in turn schedules the Day Mode switch to turn on at 6:45.
- Hub switches to Day mode via the switches table at 6:45, as expected,
- Time triggers Morning mode at 7:44 (sunrise+30), and the Morning mode rule runs again. Hub now back in Morning mode and the Day Mode switch is set to turn on at 8:14.
- Hub switches to Day mode at 8:14, as expected.
Didn't see that one coming. Now, I made some changes that I think will clear this up. But it wouldn't have happened if there was some mechanism to enforce the ordering of, or perhaps restrict transitions to, modes in Mode Mgr. I believe someone made a similar request in '21, so it's not outlandish... Would it, as in Room Lighting, be possible to say "only allow transitions to these modes" for each of the modes?