RM - action to set mode

I am having trouble figuring this out. In RM I need to create an action that would set Mode to what the current mode "should be" based on what ever time it is when the action runs. I have my Modes set to time ranges in Mode Manager. If the action is run at say 8 PM (evening mode), I'd like the action to tell Mode Manager set mode to whatever mode should be on at 8 PM. In other word, is there a simple way to trigger Mode Manager to figure out what the current mode should be and set it?

Thanks!

I was just here - experiencing the same need - my probably horrible solution was to flip hubitat to Away then back. It forces the Mode Manager to run. I asked about how to trigger Mode Manager and didn't get a solution that met my needs at that time. If you use a virtual switch, one with auto-off ability you can 'flip' the switch and 1 second later have it go back. It works well for my virtual Awake switch.
Sometimes I go to bed after 'sleep' time should kick in. I don't want my light patterns to change to sleep mode until I do - hence the Awake switch. When I ultimately go to bed, I issue a 'good night' verbal command which triggers the sleep mode. When I get up, I issue a 'I'm up' command, so regardless of what time it finds the right mode.

I don't know how to do it other than to have a bunch of conditional actions with your mode criteria.

It's a great idea, though. Why don't you suggest it as an update? HE Features and Requests for 2023? - #23 by sburke781

That is how I did it. I created a 'set mode' rule in RM with no trigger which I run from other rules such as my arrive home and wakeup routines.

Just an out of the box thought.... in the switches section of mode manager, there is an option to use a switch for return from away. This should cause mode manager to resume the timed and/or presence based control.

Return From Away

image

So, create a virtual switch,

configure the switch to enable auto off in the preferences,

AutoOff

image

then have RM run the action to turn the switch on.

(FYI - Just tested and this does work. I may use it on reboot to correct the mode issue in the latest firmware release until they push the fix for it)
Second Edit - Will not work for the current issue on reboot in the latest update. So, if that was your use case, you are going to need to use the full setup of If/Then logic to just set the proper mode)

2 Likes

Thanks for the reply jabecker. I was hoping there was a function that would do this instead but I can certainly write something. Thanks!

Thanks for the reply grizzlebeard. I was hoping there was a function that would do this instead but I can certainly write something. Thanks!

Tray_e, I was hoping there was a function or something that could be called but this is certainly a creative idea. I may try this tomorrow!

I prefer to do it with a rule as my day mode is not set by time, it is set whenever I wake up. Otherwise the virtual switch method would be my choice.

1 Like

How does your hub know when you wake up currently? If it is not timed, then there is something you are going to need as a monitor or virtual switch/button/presence to tell the hub you are awake.

I do that manually with a hue dimmer button on the bedhead. Bottom button is my mode toggle...if mode is sleep run morning routine, if evening or night then run bedtime routine.

Kinda defeats the whole purpose of automation I guess. :crazy_face: I did have it activate when I switched my htpc on or off but now leave that running as I moved it out of the bedroom.

Okay, so it sounds like you have a rule for the toggling of the button. Basically, you could add a virtual switch or button to the hub for "return from away" (or whatever you want to name it), and then have that same routine you are currently using activate the switch or button. In Mode manager, you would add that switch or button to the "return from away" table appropriate to the device. (They have a table for switches, and a separate table for buttons). Once it is set up in your rule, you would not do anything differently than just hitting the dimmer button you currently do.

I would personally use a virtual button since so that you do not have to go back and add logic to turn it off somewhere like a switch would require.

From how I understand it, there is no "return from away" command that you can issue to Mode Manager. There are only means to activate that function using presence, switches, or buttons.

Yes when I arrive home the switch would work, what I'm saying is that since I already use a rule to set the modes during wakeup/bedtime it's just easier to use one rule and then use it in multiple routines.

For this you can set the switch as auto off in the device page.

Yes, which is an added logic step that isn't needed for a button.

Ahh, well, mode manager is set up to do just what you are trying to do in one place for the most part.

I am not there would be a way to have ALL those triggers (Returning home is presence based?) in one rule. So, any way you go about it, you would be using more than one rule. I prefer the simplicity of using mode manager for the bulk and a routine if needed for the outliers.

just for info i dont use mode manager .. just rules.. one rule if time is x-y in the morning and mode is night and there is motion. change to home..

other if mode is home and time is midnight to 4 am and there is NO motion for 15 minutes change to night.

finally if both cars are gone change to away.

if any door is unlocked with code or garage door opens and mode is away change to home..

obviously everyone has they own way of doing this.

1 Like

Yes, but this is something that just isn't possible:

The closest would be to use mode manager (as one app) which still may leave you needing individual rules for one off's. That is all I was getting at.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.