Guest mode

Although we don’t have guests very often, when we do, I’d like to turn on some lights that are generally not on. I do use modes, day, evening, and night modes. I want to add a “guest mode” to turn on a hallway and powder room light. I could use a remote button to set the “guest” mode. The guest mode would replace the effects of the evening mode.

If I have a guest for a few days, I’d like the guest mode to stay persistent and activate each day until I turn it off after the guest leaves. What is the best way to do this without going to the app and changing this around?

Not sure I completely understand. Do you mean you want modes to be something like this...

W/o guest: Day, Evening, Night
W/ guest: Day, Guest, Night

and then repeat day after day as long as the guest is still there?

If so you could do a couple things... if you still want to use modes, you could have a rule that changes the mode to "guest" when mode manager (or something else) changes it to evening, as long as a virtual "guest" switch was on. I do something similar with "day" mode and "cloudy" mode. It works well though occasionally I have to fix an unintended consequence from the mode flipping in a nonsequential manner. This is more a function of the way some of my automations are built, not of the hub itself.

If you don't want to use modes you could just query the status of the virtual "guest" switch in your various automations, though that might be tricky if said automations had conditions based on modes but not on switches.

I'm not sure how applicable it is to your configuration but I use a combination of the Google Calendar app and presence. When a specific calendar entry is seen (in my case guest + room name) I have it set to enable presence for a guest in that room and my related automations honor that.

1 Like

I use an override switch for a similar purpose, if switch is on then select lights don't change regardless of mode. That condition is built into my rules for each mode.

1 Like

Brad5, your assumption is precisely what I want to do. I want the most intelligent and reliable way to implement those lights associated with guests to come on consistently when I have guests. More importantly, I would like it to pass the wife test.

I think I'd try creating a rule that flips the mode to "guest" as soon as it flips to "evening" if a virtual "guest mode" switch is on. Then you just have to make sure guest settings match evening settings +/- whatever changes you want to make, and there are no automations that get screwed up because you're in evening mode for microseconds. Also once the guest mode flips off you can either wait for mode manager to make the transition at the next interval (or however you have your modes configured) or you'd have to have a rule flip you from guest back to evening.

What threw me off when I set up "day/cloudy" modes is I originally set things up to have a predictable and linear transition from one mode to the next. I had a couple rules I had to modify to handle flipping back and forth between day and cloudy.

No being a programmer, I was thinking of using a variable so that:
0 = evening mode
1= guest mode.
I've got a wall switch with a free action I could use to toggle the condition.

My problem is I'm not sure how to set that up.

The benefit of this would be I could set it up in any of the other modes, not affecting the current mode. The action would take effect when Hubitat changed to the evening or guest mode. Ideally, I could force a change in mode if Hubitat was in evening mode and force it to switch to the guest mode or vice-versa.

I think this would basically be the same as a virtual switch, with the advantage it looks better on a dashboard and might give you more flexibility in some automations.

I have a virtual switch on a dashboard. I can then do custom actions triggered by that.
One of the triggered actions is to make a virtual presence device change to 'arrived'. That keeps the mode from changing to Away and keeps HSM from arming if I leave but the guest is still there.

1 Like

Good thinking! I would have learned that the hard way.

That's pretty much what I do. I have it set so that:

  • away mode won't trigger
  • my alarm (which arms during night mode) disarms right away just in case my guest decides to open a door. I could probably just warn them but it doesn't seem worth it to have the alarm at night for these short periods; YMMV
  • lights in the guest room will no longer be automated
  • blinds in the guest room will no longer be automated

I also set up a dashboard and mobile notification so we can toggle presence manually if we know they are gone (with us) and this lets me turn off lights and arm the alarm in those cases. I have another rule set up that detects this case (using a hub variable) and sets them back to present when they were manually toggled away and a door opens (I make the assumption this is the guest since there's no harm in getting it wrong unless it's an intruder I suppose - but odds are low and our area is pretty safe overall).

1 Like

rvrolyk- I'm having difficulty writing the code to do what you did. How's the code written for this to work?

@pnajar - do you mean the last paragraph? To toggle presence and then have it return the state later? If so then, this may be a bit more complicated than you need (and maybe there's an easier way to do this) but the general idea is that I have a rule that notifies my wife and I when we leave and one of the guest presence devices is present. That rule also sets a boolean that I use to know that we've been notified. If we've been notified and the presence changes to away, I then set another boolean indicating the guest was manually changed. Finally when an exterior door is open and that manually changed boolean is true, I flip the guest back to present under the assumption they've returned. I also flip the notify variable back to false when either my wife or I return home. Below are screenshots of those rules in that order.



1 Like

I have kept my modes simple to Day, Night, Away and Cleaning. I use virtual switches for edge cases like vacation and guests to prevent certain automations from happening when these switches are on.

Most stock apps like Simple Automations and Basic Rule have restrictions to prevent a rule from firing if a specific switch is on/off which is a reason I went with using a virtual switch. In my night rule I have a condition that checks if the guest switch is on and if so it doesn’t turn off the lights in the guest room. I also have a rule that is only enabled if the guest switch is on that will turn off the alarm if motion is detected in the morning hours.

The guest and vacation switches are managed/synced by calendar entries in my Google Calendar.

i have a virtual switch i use for when guests arrive. for some RM rules, i have a conditional "if the guest virtual switch is on, skip it/do something"

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