Run Mode Routines
Overview: Switches Modes depending on the time of day and presence. This piston pretty much does the same thing as the ST Market app, Routine Director.
Implementation: I only need/use three Modes: Day (essentially home-day, sunrise to sunset); Night (essentially home-night, sunset to sunrise); Away, when everyone is gone. Switching to any mode is done through presence (cell phones) throughout the day and night; the appropriate ST Routine is then executed. Uses ST Routines to change to your modes, to change states of your lights/locks, etc. To prevent the actions from repeatedly being executed by the coming and going of the present sensors, an Action Restrictions is used (“Only execute on condition state change”).
Feature(s): The definition of “day” and “night” is not restricted to sunrise and sunset, respectively — unlike Routine Director. You can use custom times in the piston’s conditions. You can easily add conditions/actions for more modes.
Note(s): Your ST Routines (for Mode changes) should NOT be automatically executed by ST — that’s what this piston is for 
