# Set time between 10:00PM and Sunrise

**URL:** <https://community.homey.app/t/set-time-between-10-00pm-and-sunrise/133397>\
**Category:** Questions & Help\
**Tags:** homey-pro\
**Created:** [March 24, 2025, 5:29pm UTC](https://community.homey.app/t/set-time-between-10-00pm-and-sunrise/133397 "2025-03-24T17:29:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajaffarali](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ajaffarali/32/123070_2.png) [@ajaffarali](https://community.homey.app/u/ajaffarali)\
**Post date:** [March 24, 2025, 5:29pm UTC](https://community.homey.app/t/set-time-between-10-00pm-and-sunrise/133397/1 "2025-03-24T17:29:03Z")

</div>

I am trying to set an automation to work between 10PM and Sunrise. I can see the option to select the starting and ending time but can one set between Sunrise/Sunset and an hour?

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [March 24, 2025, 5:56pm UTC](https://community.homey.app/t/set-time-between-10-00pm-and-sunrise/133397/2 "2025-03-24T17:56:12Z")

</div>

You nred at least two conditions;  
WHEN …  
AND After 10PM  
OR Before Sunrise

THEN …

Both check against a day so that should work

---

<div class="post-metadata">

**Author:** ![Andy\_Henderson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andy_henderson/32/80642_2.png) [@Andy\_Henderson](https://community.homey.app/u/Andy_Henderson)\
**Post date:** [March 25, 2025, 12:23pm UTC](https://community.homey.app/t/set-time-between-10-00pm-and-sunrise/133397/3 "2025-03-25T12:23:31Z")

</div>

You could create two flows:

When ‘The time is’ 10pm  
Start doing what you want

When ‘The sun rises in’ 0 minutes  
Stop doing what you started

So, for example, you could turn a light on at 10pm and turn it off at sunrise.

I would put both in an advanced flow to make it easier to see what’s happening.

Andy

---

<div class="post-metadata">

**Author:** ![ajaffarali](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ajaffarali/32/123070_2.png) [@ajaffarali](https://community.homey.app/u/ajaffarali)\
**Post date:** [March 25, 2025, 8:08pm UTC](https://community.homey.app/t/set-time-between-10-00pm-and-sunrise/133397/4 "2025-03-25T20:08:24Z")

</div>

Thanks for the replies. What I am trying to set is the following:

If Zone becomes active and time is between Sunrise and 10:30 PM then turn on the lights

---

<div class="post-metadata">

**Author:** ![Wim\_Post](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wim_post/32/56793_2.png) [@Wim\_Post](https://community.homey.app/u/Wim_Post)\
**Post date:** [March 25, 2025, 9:01pm UTC](https://community.homey.app/t/set-time-between-10-00pm-and-sunrise/133397/5 "2025-03-25T21:01:42Z")

</div>

![Scherm­afbeelding 2025-03-25 om 22.53.15](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/1/01f16e38b37ce276f61d88ce145952347dfe5c16.png)

After 10Pm is true between 22:00 and 24:00  
Before sunrise is true between 0:00 and sunrise  
So between 10Pm and sunrise one of the two conditions has to be true.

After sunrise is true between sunrise and 24:00  
Before 10:30 PM is true between 0:00 and 22:30  
So between sunrise and 10:30PM both conditions have to be true.

Edit at 22:55 corrected flow and replaced screenprint after remark Dijker

> [@Dijker](#):
>
> First Flow u use
> 
> - Later than 22u00 OR Before SunSet (in the screenshot) and write about Sunrise…

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [March 25, 2025, 9:44pm UTC](https://community.homey.app/t/set-time-between-10-00pm-and-sunrise/133397/6 "2025-03-25T21:44:40Z")

</div>

> [@Wim\_Post](#):
>
> ![Scherm­afbeelding 2025-03-25 om 22.06.26](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/d/4d6c8ac889b514b5b31735d9fb7721655e15a642.png)
> 
> After 10Pm is true between 22:00 and 24:00  
> Before sunrise is true between 0:00 and sunrise

First Flow u use

- Later than 22u00 OR Before SunSet (in the screenshot) and write about Sunrise…

Question was:

> [@ajaffarali](#):
>
> set an automation to work between 10PM and Sunrise.

so not quite the question… confusing,
