I thought I would share this with everyone… I wanted to find someway to be able to give a house sitter our keys but also have the house react to them… The obvious way of doing this is is using a SmartPresence Sensor… But then when we don’t have someone house sitting it will always show up as being present and the auto away functions won’t work…
I figured out a way to do exactly what I wanted to do. I added the SmartPresence sensor to the system and then I also created a Virtual Switch Tile (From the SmartThings example devices) as a house sitter enable switch., Then I wrote code based off of the SmartPresence sensor to make a Virtual Presence Sensor (ZP Virtual Presence), I use this Virtual Presence to add into the hello home actions etc. Finally the SmartApp that I wrote looks at the House Sitter Enable Switch and if its on then sets the virtual presence sensor to the same value as the real sensor, if it is off then it will make the virtual presence as away, thus allowing my hello home actions to work. Finally I decided to group this all together in a group called house sitter.
Now when I go out of town I can just give them the keychain and enable house sitter mode and have the house react to them and the rest of the time just have the keys on the rack and disable the switch and not have to worry about it getting in the way of my automation.
All the code is in my github: https://github.com/zpriddy/SmartThings/tree/master/House%20Sitter
Just make sure you add the device and the virtual switch.
If you need any help with it just post here and I will help you.