# Before and after sunset

**URL:** <https://community.homey.app/t/before-and-after-sunset/125508>\
**Category:** Questions & Help\
**Tags:** homey-pro\
**Created:** [December 26, 2024, 5:38pm UTC](https://community.homey.app/t/before-and-after-sunset/125508 "2024-12-26T17:38:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mats1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mats1/32/113961_2.png) [@Mats1](https://community.homey.app/u/Mats1)\
**Post date:** [December 26, 2024, 5:38pm UTC](https://community.homey.app/t/before-and-after-sunset/125508/1 "2024-12-26T17:38:23Z")

</div>

Hi,  
I have a number of switches for lamps that I want to turn on, let’s say 30 min before sunset and turn off 30 min after sunset.

I can create cards in the flows relating to sun rising in X minutes and/or setting in X minutes…

Is it as simple that I can insert a negative number like -30 in I want the switch to turn off 30 min AFTER the sun sets or AFTER it has risen?

Or another way ? Or not at all?

---

<div class="post-metadata">

**Author:** ![OH2TH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/oh2th/32/111414_2.png) [@OH2TH](https://community.homey.app/u/OH2TH)\
**Post date:** [December 26, 2024, 5:58pm UTC](https://community.homey.app/t/before-and-after-sunset/125508/2 "2024-12-26T17:58:15Z")

</div>

Have a look at previuos discussion [Sunset offset](https://community.homey.app/t/sunset-offset/88458)

---

<div class="post-metadata">

**Author:** ![Theo\_de\_Koning](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/theo_de_koning/32/136062_2.png) [@Theo\_de\_Koning](https://community.homey.app/u/Theo_de_Koning)\
**Post date:** [December 26, 2024, 5:59pm UTC](https://community.homey.app/t/before-and-after-sunset/125508/3 "2024-12-26T17:59:48Z")

</div>

Look by the app [Zonnestanden App voor Homey | Homey](https://homey.app/nl-nl/app/com.cyclone-software.sunevents/Zonnestanden/)

---

<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:** [December 26, 2024, 8:00pm UTC](https://community.homey.app/t/before-and-after-sunset/125508/4 "2024-12-26T20:00:49Z")

</div>

> [@Mats1](#):
>
> Is it as simple that I can insert a negative number like -30 in I want the switch to turn off 30 min AFTER the sun sets or AFTER it has risen?

Just try it and you know it 😁

---

<div class="post-metadata">

**Author:** ![Goshawk29](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/goshawk29/32/79000_2.png) [@Goshawk29](https://community.homey.app/u/Goshawk29)\
**Post date:** [January 21, 2025, 12:07am UTC](https://community.homey.app/t/before-and-after-sunset/125508/5 "2025-01-21T00:07:22Z")

</div>

Lately I have been having issues too using date/time sunset feature. What I am confused on is if I create a simple basic flow, it will allow a negative number for 15 minutes after sunset. But if I put the flow into an advanced flow, it will not accept a negative number. Any ideas? I’m sure I am missing something so simple but it has me perplexed right now.

 ![Screenshot 2025-01-20 at 6.05.41 PM](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/d/2d878b5f56ce244ac5339a4407e8cee81b9648bc.jpeg)

 ![Screenshot 2025-01-20 at 6.06.33 PM](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/c/5c22da99e665cad5a3ee1a0a64ad0d6d0703115e.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 21, 2025, 4:13am UTC](https://community.homey.app/t/before-and-after-sunset/125508/6 "2025-01-21T04:13:03Z")

</div>

The Sun Events app has way more options

---

<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 21, 2025, 8:47am UTC](https://community.homey.app/t/before-and-after-sunset/125508/7 "2025-01-21T08:47:46Z")

</div>

I can enter negative numbers. Try a different browser?  
Or use a variable with a negative number.

---

<div class="post-metadata">

**Author:** ![Theo\_de\_Koning](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/theo_de_koning/32/136062_2.png) [@Theo\_de\_Koning](https://community.homey.app/u/Theo_de_Koning)\
**Post date:** [January 21, 2025, 8:51am UTC](https://community.homey.app/t/before-and-after-sunset/125508/8 "2025-01-21T08:51:32Z")

</div>

Negative numbers in the Date & Time card is became a bug says Athom.  
Because it gives problems in other fields.

Now I use the Zonnestanden app.

---

<div class="post-metadata">

**Author:** ![Goshawk29](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/goshawk29/32/79000_2.png) [@Goshawk29](https://community.homey.app/u/Goshawk29)\
**Post date:** [January 22, 2025, 11:17pm UTC](https://community.homey.app/t/before-and-after-sunset/125508/9 "2025-01-22T23:17:45Z")

</div>

I have emailed them but know they are swamped and I was thinking this was a bug in system Date & Time cards but wanted to make sure. Stare at flows and home setup long enough and I swear 2 plus 2 is 5. Thanks

---

<div class="post-metadata">

**Author:** ![Goshawk29](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/goshawk29/32/79000_2.png) [@Goshawk29](https://community.homey.app/u/Goshawk29)\
**Post date:** [January 22, 2025, 11:20pm UTC](https://community.homey.app/t/before-and-after-sunset/125508/10 "2025-01-22T23:20:57Z")

</div>

yeah looks like have to add another app LOL and change flows but that app looks spicy with options. But seem to be 180 from date/time meaning where put neg number in sun events have to us positive and vice versa. Confusing…but looks to be more robust.
