# Test AND n minutes before Sunrise or n minutes before Sunset

**URL:** https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878
**Category:** Flows
**Created:** [January 9, 2026, 9:11am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878 "2026-01-09T09:11:51Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Steve\_Nye](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steve_nye/32/123396_2.png) [@Steve\_Nye](https://community.homey.app/u/Steve_Nye)
#### Post date: [January 9, 2026, 9:11am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/1 "2026-01-09T09:11:51Z")

</div>

I noticed that it was very dark when Homey said it was no longer Daytime, so I checked my location and it was fine. Is there a way to test in an AND statement the minutes before Sunrise or Sunset?

Steve

---

<div class="post-metadata">

### Author: ![smarthomesven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/smarthomesven/32/79712_2.png) [@smarthomesven](https://community.homey.app/u/smarthomesven)
#### Post date: [January 9, 2026, 9:14am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/2 "2026-01-09T09:14:03Z")

</div>

In an Advanced Flow (only available in the web app), it’s possible to test conditions

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [January 9, 2026, 11:12am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/3 "2026-01-09T11:12:24Z")

</div>

So you want to know the actual time Homey is using for sun rise and sun down?

I should expect it somewhere in the system Info [Homey Developer Tools](https://tools.developer.homey.app/tools/system) but was not able to find it anywhere.

Due to wheather conditions sun rise and sun down are no good replacements for a lux sensor.

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [January 9, 2026, 11:15am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/4 "2026-01-09T11:15:12Z")

</div>

I think he wants to know the number of minutes before sun down at this moment.

---

<div class="post-metadata">

### Author: ![Steve\_Nye](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steve_nye/32/123396_2.png) [@Steve\_Nye](https://community.homey.app/u/Steve_Nye)
#### Post date: [January 9, 2026, 11:19am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/5 "2026-01-09T11:19:24Z")

</div>

That is it I wanted to test a condition relative to Sunrise and Sunset.

What I am trying to achieve as to make the House Daytime say start 30 minutes earlier and end 30 minutes later than Homey’s Daytime.

I was wondering if anyone had a custom app as out of the box I can only test is it sunrise or sunset.

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [January 9, 2026, 11:23am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/6 "2026-01-09T11:23:06Z")

</div>

There is a date card WHEN it is xx minutes before Sunrise

And search the App Store for sun.

> **[Zonnestanden | Homey](https://homey.app/nl-nl/app/com.cyclone-software.sunevents/Zonnestanden/)**
>
> Bij diverse zonnestanden kunt u triggers maken, u kunt ook uw eigen events defineren.

---

<div class="post-metadata">

### Author: ![Steve\_Nye](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steve_nye/32/123396_2.png) [@Steve\_Nye](https://community.homey.app/u/Steve_Nye)
#### Post date: [January 9, 2026, 11:26am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/7 "2026-01-09T11:26:22Z")

</div>

I agree but I have found some Lux sensors to be slow to respond . So I check the Lux when it thinks it is day time to see if it is dark otherwise it is night and therefore dark. That way I am more likely to have lights on when it is dark

---

<div class="post-metadata">

### Author: ![Steve\_Nye](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steve_nye/32/123396_2.png) [@Steve\_Nye](https://community.homey.app/u/Steve_Nye)
#### Post date: [January 9, 2026, 11:33am UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/8 "2026-01-09T11:33:00Z")

</div>

Absolutely perfect - Many thanks

---

<div class="post-metadata">

### Author: ![Bubiai\_2](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@Bubiai\_2](https://community.homey.app/u/Bubiai_2)
#### Post date: [January 10, 2026, 5:32pm UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/9 "2026-01-10T17:32:16Z")

</div>

It’s good at sunset when it’s always clear outside.

Outdoor Philips Hue (with bridge) motion sensors, working properly. (It has a light sensor)

---

<div class="post-metadata">

### Author: ![Steve\_Nye](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steve_nye/32/123396_2.png) [@Steve\_Nye](https://community.homey.app/u/Steve_Nye)
#### Post date: [January 10, 2026, 8:09pm UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/10 "2026-01-10T20:09:19Z")

</div>

That is what I use. A flow uses one sensor as the basis for each determining if each room is dark or not based upon experience over time, with a fallback should the sensor fail of sunset/sunrise.

---

<div class="post-metadata">

### Author: ![Bubiai\_2](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@Bubiai\_2](https://community.homey.app/u/Bubiai_2)
#### Post date: [January 10, 2026, 10:09pm UTC](https://community.homey.app/t/test-and-n-minutes-before-sunrise-or-n-minutes-before-sunset/148878/11 "2026-01-10T22:09:02Z")

</div>

Ok. I’ve been using sunset apps for a long time…I mentioned it because of the clear sky., when the sun hides faster behind the terrain…

I would divide the rooms into separate blocks. One VD relay per block. The relay switches on depending on the illumination (lx). This allows or prevents the lighting from turning on(auto mode, lx allows you to turn on, turns on by motion sensor ). This enables or disables the block. (It also enables or disables flow).

I have no faults(maybe 5year) with this place. I have nothing more to comment on.
