# After Sunset Routine?

**URL:** <https://community.smartthings.com/t/after-sunset-routine/27999>\
**Category:** SmartApps & Automations\
**Created:** [November 3, 2015, 9:23pm UTC](https://community.smartthings.com/t/after-sunset-routine/27999 "2015-11-03T21:23:40Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![SBDOBRESCU](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/sbdobrescu/32/30067_2.png) [@SBDOBRESCU](https://community.smartthings.com/u/SBDOBRESCU)\
**Post date:** [November 12, 2015, 9:43pm UTC](https://community.smartthings.com/t/after-sunset-routine/27999/25 "2015-11-12T21:43:46Z")

</div>

My set up is more complex, or else I would have taken screenshots. But I’ll try to be as detailed as possible.

**Here we go:**

> [@Hilly\_2015](#):
>
> What are the modes you have set up?

• Daytime  
• Evening  
• Away  
• Away at Night  
• Vacation

> [@Hilly\_2015](#):
>
> What routines do you have set up?

• Good Morning  
• Good Evening  
• Good bye  
• I’m back  
• I’m back at Night  
• Vacation

> [@Hilly\_2015](#):
>
> How do you create a routine which checks for 2 things i.e. if in Evening mode, or at Sunset in Away mode

By making your home change the mode automatically, based on sun state AND current mode.

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* **When everyone is home:** \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

A. Create a routine called **Good Morning**

Settings

1 . Change the mode to: select Daytime  
2 . Additional settings… “Automatically perform “Good Morning” at”: Sunrise (ONLY if in Evening Mode)  
_ **Note: to achieve the ONLY if mode, you need to select ALL but Evening under section "Don’t** _  
_**automatically do this if I am in one of these modes - see pic #3 below)**_

Here is how it looks on Android:

**Pic 1 This is the main page that shows the automatically perform Good Morning at sunrise (changing the mode to Morning- Daytime in your case)**

 ![](https://global.discourse-cdn.com/smartthings/original/3X/8/9/89958e2e5d24fcca0244f7d593e64e77e9135dcf.jpg)

**Pic 2 This is where you should see all but Evening Mode.**

 ![](https://global.discourse-cdn.com/smartthings/original/3X/8/7/87a321e272e12dac7e1133f0b53f930c1be7252f.jpg)

**Pic 3 …and this is how you restrict the routine to run ONLY if in Evening Mode**

 ![](https://global.discourse-cdn.com/smartthings/original/3X/0/f/0f76b978a7f0a054b646c251fe4309593c5e932c.jpg)

**Once you get a hang of this setting, the rest are just replicas of the same logic …aka …rinse and repeat.**

B. Create a routine called **Good Evening** , set it to be performed at sunset ONLY if in Daytime Mode - (check all modes but Daytime).

Above two routines are taking care of the situation where _ **someone is home** _. Next, we need to set up routines for when everyone leaves…

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* **When everyone leaves** \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

C. Create a routine called **Good Bye** , which changes the mode to Away and runs automatically when _ **everyone leaves** _ ONLY when in Daytime mode (check all modes but Daytime)

D. Create **Away at Night** , which changes mode to Away at Night, at sunset, ONLY in Away Mode (check all modes but Away)  
_**Note: this one is the only one you need to manually push if everyone leaves after sunset (it happens rarely in my home so I didn’t really bother to find a way to automate this part)**_

These 2 take care of the home when no one is home, next will take care of the routines when someone arrives.

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* **When someone arrives** \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

E. create a routine called **“I’m Back”** , which runs automatically when someone arrives, ONLY in Away Mode (check all modes but Away)

F. create a routine called **“I’m back at Night”** , which runs automatically when someone arrives ONLY when mode is Away at Night

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* **When everyone is out of town:** \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

G. create a routine called **”Vacation”** , which runs automatically at sunrise ONLY if mode is Away at Night

ALTERNATIVELY. …you could use Bruce’s new Rule app, which should get you there much faster. It didn’t exist when I created my set up, and I am way deep to convert it now.

> [@Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support](https://community.smartthings.com/t/release-rule-machine/28730):
>
> Rule Machine is no longer available.

Let me know if something is not clear…Good luck

---

_[View the full topic](https://community.smartthings.com/t/after-sunset-routine/27999)._
