# Can't create automation with sunset/sunrise time combined with a fixed time?

**URL:** <https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539>\
**Category:** FAQ\
**Created:** [February 12, 2020, 4:26pm UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539 "2020-02-12T16:26:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hevykevy420](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@hevykevy420](https://community.smartthings.com/u/hevykevy420)\
**Post date:** [February 12, 2020, 4:26pm UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/1 "2020-02-12T16:26:50Z")

</div>

Hello everyone, first post here, transitioning from a Wink hub.

In rebuilding my existing automations in ST, I cannot figure out how to create an automation that includes a time period starting with sunset/sunrise, and ending with a set time. This seems like a serious functionality shortcoming of the smartthings application.

For instance, I have a motion sensor in the bedroom that I would like to trigger a set of lamps ON only after sunset when motion is detected, and have this automation cease at 10pm. This is helpful for walking into a dark bedroom room, and then after 10pm the lights are not triggered when somebody rolls over in bed.

I had several similar automations set up in Wink that I cannot replicate in ST, even though there definitely are some more complex automation controls in ST. Somewhat surprised that I cannot build automations to combine sunset/sunrise with a set time for the active period.

I thought there might be a workaround to have an automation turn on/off another automation at a set time, but that does not seem to be possible in ST.

Am I missing a workaround (newbie user), or is this just “how it is” with ST? If so, is there a planned ST enhancement to include this functionality? I don’t feel like I’m an automation power user, so there HAS to be others that would benefit from the ability to build automation time periods that combine sunrise/sunset times with fixed times.

---

<div class="post-metadata">

**Author:** ![GSzabados](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/gszabados/32/73805_2.png) [@GSzabados](https://community.smartthings.com/u/GSzabados)\
**Post date:** [February 12, 2020, 4:30pm UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/2 "2020-02-12T16:30:17Z")

</div>

Try the Smart Lighting SmartApp.

Press the + icon, the SmartApp and on the next page I believe add a SmartApp and select the Smart Lighting from the list. It has the feature what you are asking for.

---

<div class="post-metadata">

**Author:** ![hevykevy420](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@hevykevy420](https://community.smartthings.com/u/hevykevy420)\
**Post date:** [February 12, 2020, 5:01pm UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/3 "2020-02-12T17:01:09Z")

</div>

Found it via Smart Lighting Smart App! Thank you @GSzabados! This looks like it should work for what I want to do. I was trying to create this via “Automations”.

…One thing I’m having to get used to is there are about 3+ ways to create a lighting automation and/or timed lighting events it seems like…

Thanks very much.

---

<div class="post-metadata">

**Author:** ![GSzabados](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/gszabados/32/73805_2.png) [@GSzabados](https://community.smartthings.com/u/GSzabados)\
**Post date:** [February 12, 2020, 5:06pm UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/4 "2020-02-12T17:06:13Z")

</div>

For Lighting I use Smart Lighting, actually have some similar rules as what you want, and it is definitely working.

---

<div class="post-metadata">

**Author:** ![samuelg0rd0n](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/samuelg0rd0n/32/155424_2.png) [@samuelg0rd0n](https://community.smartthings.com/u/samuelg0rd0n)\
**Post date:** [March 16, 2022, 8:26am UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/5 "2022-03-16T08:26:43Z")

</div>

Hi, I’m sorry, I’m fairly new to SmartThings and I’m looking to do exactly the same - to turn on automations at sunset and turn it off at specific time (when I go to bed). I can’t seem to be able to do that via standard automations in SmartThings app. What is the recommended “Smart Lighting SmartApp”? Where do I find it?

I found something called “SmartApp” on [https://graph.api.smartthings.com](https://graph.api.smartthings.com) and there are some templates but I can’t see anything called “Smart Lighting”.

---

<div class="post-metadata">

**Author:** ![hevykevy420](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@hevykevy420](https://community.smartthings.com/u/hevykevy420)\
**Post date:** [March 16, 2022, 2:31pm UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/6 "2022-03-16T14:31:52Z")

</div>

I don’t think you find it via the ide/web interface…(I could be wrong though as it’s been years since I added smart lighting).

I think it’s located via the mobile application. I attached a screenshot of the mobile app with it installed. To my knowledge, using “smart lighting” is the only way to incorporate sun up/down times with fixed times in automations.

 ![Screenshot_20220316-082722](https://global.discourse-cdn.com/smartthings/original/3X/a/a/aad751311622c7b15ef688cc0a7fa449e42d64bc.png)

---

<div class="post-metadata">

**Author:** ![jkp](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jkp/32/117130_2.png) [@jkp](https://community.smartthings.com/u/jkp)\
**Post date:** [March 16, 2022, 3:29pm UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/7 "2022-03-16T15:29:29Z")

</div>

Smart Lighting is not available in all regions. If it is available in your region, go to Automations \> + \> Add Routine and click on the Discover tab near the top.

Now, Smart Lighting will be phased out when groovy support ends on the ST platform so it may not be a good choice at this point as you will need to move any Smart Lighting rules you create over to Automations. When this will occur is unknown.

---

<div class="post-metadata">

**Author:** ![vseven](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/vseven/32/35333_2.png) [@vseven](https://community.smartthings.com/u/vseven)\
**Post date:** [March 16, 2022, 5:09pm UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/8 "2022-03-16T17:09:54Z")

</div>

> [@jkp](#):
>
> mart Lighting will be phased out when groovy support ends on the ST platform so it may not be a good choice at this point

This is exactly why I have slowly been moving my Smart Lighting rules over to automatons. For what @hevykevy420 wants to do I will make a routine called “Deck Lights On At Sunset” then a separate one called “Deck Lights Off At 11pm”. Hated doing it this way at first but I’ve grown to like this better actually, having separate rules for each thing happening.

---

<div class="post-metadata">

**Author:** ![Declankh](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/declankh/32/153620_2.png) [@Declankh](https://community.smartthings.com/u/Declankh)\
**Post date:** [March 21, 2022, 2:42am UTC](https://community.smartthings.com/t/cant-create-automation-with-sunset-sunrise-time-combined-with-a-fixed-time/186539/9 "2022-03-21T02:42:46Z")

</div>

I think you could do this with a virtual switch.

Routine 1 = set switch on at sunset  
Routine 2 = lights triggered in bedroom when motion detected and sunset switch is on and time less than 10pm

Routine 3 = lights off after x minutes no motion (assume you want that)

Routine 4 = set sunset switch off at sunrise
