How to setup a Mode, that once it changes after a short time it can return back to it's last state based on time of day?

Basically what I have going on right now is when I pull up in front of our house, the Mode will change to Arrival: Mode. Which will open the garage door, turn some lights on and make announcements, then after 5 minutes it will then change to Home: Mode.

But if I arrive home after Sunset (Evening: Mode). Because I also have other lights that turn on with motion sensors based on Evening: Mode, they will not turn on because Home: mode is still running. Even though that time of day, Evening: Mode would be running.

What I'm wanting to do is after a short time after Home: mode has ran, is to change back (or) to which ever of the five preset Modes are schedule to run based on time of day.


These are the Modes that I have set up in Mode Manger.
Morning: Sunrise
Day: 10:00 AM
Evening: Sunset -15
Night: 11:00 PM
Late Night: 12:00 AM
Arrival: David's Mobile Phone
Away: David's Mobile Phone
Home: (only used to end Arrival: mode)

Sorry if I made this sound more complicated then it is.
I tried to search for How to set Modes back from previous state, but didn't have any luck.

Thanks for any suggestion!

I would have one rule that sets Morning, Day, Evening, Night, and Late Night. The triggers for that rule should be the corresponding times. Inside the rule, have a condition that disables modes changes during Arrival, Away, and Home modes. Then, I would have a rule for arriving home, with a trigger of your phone. In that rules actions, set arrival mode, wait for 5 minutes, change to home mode, wait a few minutes, then call the actions of your first rule. Finally, a third rule sets away mode based on your phone.

1 Like

@reid.a.baldwin Thanks, I'll give that a try!

@reid.a.baldwin
Sorry to bother you.
I'm not that great at writing complex rules, so I've been sitting here trying to set up a rule as you mentioned, but I'm getting myself nowhere fast.

When you have the time (no rush) could you please create a rule like you mention, with hope I could see how the rule is written out so I can recreate it myself.

Again I would be grateful, thanks!

I will share my rules for modes which follow a similar structure. This rule sets to mode to one of Morning, Day, Weekend, or Evening based on time of day and day of the week. Note that the logic is inside a conditional block that only executes it when at least one person is home. That keeps it from messing up my Away mode. There are triggers shortly after each time-based transition.


I double click a switch near my bed to go into night mode, according to the rule below. Alternatively, I can switch the bathroom nightlight on. Since I have the bedroom lights go off in response to Night mode (another rule), I have it wait 30 seconds so I have time to get in bed before it gets dark.

I end Night mode by turning off the bathroom nightlight or turning on one of the switches that I normally turn on in the morning. The rule below accomplishes that.

Finally, I have a rule to handle Away mode. This rule utilizes a variable Number_of_occupants. That variable gets set in a different rule that goes through the presence sensors for people in the family and adds up how many are there. When that variable goes from 0 to a positive number, the rule calls my first rule to set the mode based on time of day. When that variable goes from positive to 0, the rule sets the mode to Away.

1 Like

@reid.a.baldwin

Thank you so much!
I am very grateful that you took the time out to do this for me.
This really helps me out a lot, I now understand more of what you were saying about having the 'logic is inside a conditional block' now!