First post and project and foremost the reason why I joined Smartthings: to automate our chaotic household and save time and money by not having to manage everything.
Me and my partner have, due to the nature of our jobs, very different workhours (daycare, nightwork, etc). Also our cleaning lady needs to be taken into account.
So I created this piston, wich I would like to share with others who struggle to achieve stable automation of the basic modes.
The IFTTT entries are actually triggered by Tasker on our Android devices, wich track our location and sleeping cycles (charging state phone), and my calendar (cleaning lady).
Love to hear about any suggestions about optimizing the code. Since this is my first contribution.
(edited: cleaned up some code)