# No minutes setting for sunrise/sunset "And-Card"

**URL:** <https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838>\
**Category:** Questions & Help\
**Tags:** flow, homey-pro\
**Created:** [December 19, 2022, 2:11pm UTC](https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838 "2022-12-19T14:11:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/chrisg/32/8825_2.png) [@ChrisG](https://community.homey.app/u/ChrisG)\
**Post date:** [December 19, 2022, 2:11pm UTC](https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838/1 "2022-12-19T14:11:20Z")

</div>

I have written an AF where I need to query a range between 30 min before sunrise and and 30 min sunset. However, I have now noticed that you can only enter minutes on the trigger card and not on and card. I also tried with the “Sun Events App” and it doesn’t work there either.

Has anyone found a solution to this problem ?

myFlow:  
(Sorry I can’t do a file upload at the moment because of an Uppy error…🥴…)

---

<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:** [December 19, 2022, 3:15pm UTC](https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838/2 "2022-12-19T15:15:08Z")

</div>

For conditions you never can say if xxx is true over 30 minutes 😉  
That sounds logic for me.

So maybe define new Sun events x degrees shifted from the fixed event you refer to now.

---

<div class="post-metadata">

**Author:** ![ChrisG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/chrisg/32/8825_2.png) [@ChrisG](https://community.homey.app/u/ChrisG)\
**Post date:** [December 19, 2022, 3:23pm UTC](https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838/3 "2022-12-19T15:23:06Z")

</div>

Yes&No, the time of daily sunrise and sunset is fixed for my position, so you can subtract 30 minutes from that to determine if the condition is true or false

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [December 19, 2022, 5:17pm UTC](https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838/4 "2022-12-19T17:17:40Z")

</div>

> [@ChrisG](#):
>
> I also tried with the “Sun Events App” and it doesn’t work there either.

Doesn’t it work, or don’t you know how to create it?  
Because theoretically it‘s possible, but I didn’t tested it:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/3/c30491a7035e03ce48417ee44fca01ee84999431.jpeg)  
(I have only put both versions together in one flow as an example.)

---

<div class="post-metadata">

**Author:** ![ChrisG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/chrisg/32/8825_2.png) [@ChrisG](https://community.homey.app/u/ChrisG)\
**Post date:** [December 20, 2022, 1:39pm UTC](https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838/5 "2022-12-20T13:39:13Z")

</div>

Thanks for the help, the problem was with the “-30”, now it looks cleaned up like this, and now it seems to work (hopefully) 😉

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/1/313ac8bcfd7dbd00ebdc79bbf43ccabf606b867d.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:** [December 20, 2022, 7:21pm UTC](https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838/6 "2022-12-20T19:21:02Z")

</div>

You can test it ‘now’, when you temporary move your location on Homey to timezones where the sun is going to rise / set 😉

---

<div class="post-metadata">

**Author:** ![ChrisG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/chrisg/32/8825_2.png) [@ChrisG](https://community.homey.app/u/ChrisG)\
**Post date:** [December 21, 2022, 5:07am UTC](https://community.homey.app/t/no-minutes-setting-for-sunrise-sunset-and-card/73838/7 "2022-12-21T05:07:25Z")

</div>

OR I test the whole over the day distributed in three steps (init) and then control the rest (trigger) simply in my log (For something I have also written a flow logger).

Takes a little longer but that is much easier …😜…
