Guest Mode using a virtual switch

Hi everyone,

I’m looking for a very simple solution to ensure that when I have guests and when I leave the house, that all my away automation doesn’t start.

In other words, I’m thinking of e.g. having a virtual switch “The Guest”, when the virtual switch are ON it have a corresponding virtual device e.g. device_tracker.virtual_guest set to ‘home’ — that way when all of my automation looks at the state of group.all_devices - and when the GUEST is ‘home’ or rather the virtual switch are on ‘ON’ state, it would seem like a someone are at home.

So my question would be - would this be the easiest way to implement a guest mode and how do I actually implement this, any suggestions and guiding examples? :slight_smile:

I have an input_boolean for guests. And a template sensor which combines all monitored devices plus the input_boolean. In all my automations I check the template sensor instead of the device trackers.

link removed

Hi @anon43302295

Well not as simple :wink: as I have hoped - on the other hand I think this would be somewhat required, in order to achieve what I was looking for… I guess I would be able to reduce a bit here and there, but the main logic it in the Package.

Thanks for sharing ! :slight_smile:

1 Like

this is pretty simple.

Create an input boolean called guest mode.

Then make a call to turn off the automations you don’t want to run while you are gone. (Create another with the opposite action to turn them back on when you return or want guest mode off. )

Below is an example.

2 Likes

Hi @silvrr

Thanks, however I would like of the automations to able run, just as if I actually myself was home. However I do like the simplicity of your approach :slight_smile: :ok_hand:t4:

Whoops, I didn’t read the second paragraph of your op correctly.

Do you use MQTT? You could easily setup an mqtt device tracker and set it home or not_home/away with an input boolean and automation.

MQTT no haven’t been looking into this – at least not yet :slight_smile:

I was looking for a way to achieve this for a long time…
Thanks buddy, it works like a charm with a MQTT device tracker :slight_smile: !