# \[APP\]\[Pro\] Sun Events - Triggers you at certain positions of the sun

**URL:** <https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043>\
**Category:** Apps\
**Tags:** homey-pro\
**Created:** [October 23, 2022, 2:24pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043 "2022-10-23T14:24:16Z")\
**Posts on this page:** 20\
**Page:** 9

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [August 9, 2023, 7:51am UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/162 "2023-08-09T07:51:25Z")

</div>

Hi, I try to update the production version only but there is apparently no solution for. I will update the 2.x release to beta today or tomorrow…

---

<div class="post-metadata">

**Author:** ![t\_F](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/t_f/32/12457_2.png) [@t\_F](https://community.homey.app/u/t_F)\
**Post date:** [August 10, 2023, 6:54pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/163 "2023-08-10T18:54:06Z")

</div>

Thanks for the latest update (2.1.2) @MarcelT .

It’s not completely clear to me, but are all of the changes (bugfixes) in the 1.4-branch (f.e. 1.4.7 and 1.4.8) also implemented in the 2.x-branch?

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [August 10, 2023, 7:09pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/164 "2023-08-10T19:09:49Z")

</div>

Yes, 1.4.x will be replaced by the 2.x

---

<div class="post-metadata">

**Author:** ![Martijn8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn8/32/34267_2.png) [@Martijn8](https://community.homey.app/u/Martijn8)\
**Post date:** [August 29, 2023, 7:53pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/165 "2023-08-29T19:53:52Z")

</div>

Hello

I’m using sun events to control the position of my screens and blinds. Last few weeks I noticed unexpected behavior for which I think I found the root cause.

I use multiple flow “and’” cards, type "time is after {event}; in combination with events linked to certain altitudes to set the blind position. Works perfect during mid summer.

At this time of the year, the sun does not reach the highest altitude of 55 degrees. But, the event is still created and the time for this event is set to 1 jan 1970, 01:00.

As actual time during the day is always later as 1:00, the "and"flow card still triggers a “true” condition, resulting the remaining part of the flow sets the wrong blind position.

More logical, expected behavior would be to not create the event if the altitude is not reached, or alternative, output “false” in the relevant flow cards.

Please check my reasoning, and if possible, change the flow card behaviour.

Best  
Martijn

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/5/65f4bfc0c146990c58421c5b5e01cff75922565e.png)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/3/c345c996ee0fba58f312de91bcb6a2798ab48e71.png)

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/9/49a5c6bc7d7ddd8e0a064d5def41e99c04f217ce.png)

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [August 30, 2023, 6:21am UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/166 "2023-08-30T06:21:40Z")

</div>

When I have some time I will change this to your suggestion.

---

<div class="post-metadata">

**Author:** ![Martijn8](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn8/32/34267_2.png) [@Martijn8](https://community.homey.app/u/Martijn8)\
**Post date:** [August 30, 2023, 8:04pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/167 "2023-08-30T20:04:57Z")

</div>

Thanks! I’ll keep an eye on the change log…

---

<div class="post-metadata">

**Author:** ![Jeroen\_W](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_w/32/9803_2.png) [@Jeroen\_W](https://community.homey.app/u/Jeroen_W)\
**Post date:** [October 17, 2023, 1:16pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/168 "2023-10-17T13:16:54Z")

</div>

Is it possible to get the day length/how long the sun is up in a variable?  
I’m using a growlight for my plants and if the daylight is shorter than x hours the light needs to be turned on.

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [October 17, 2023, 2:48pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/169 "2023-10-17T14:48:12Z")

</div>

I think this is already in the test version

---

<div class="post-metadata">

**Author:** ![Jeroen\_W](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_w/32/9803_2.png) [@Jeroen\_W](https://community.homey.app/u/Jeroen_W)\
**Post date:** [October 17, 2023, 6:14pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/170 "2023-10-17T18:14:36Z")

</div>

Thanks i’ve found it. Only problem is that it’s a text tag and not a number ☹. So now i can’t use it for bigger/smaller than cards. Is it possible to change the ; to a . ?

---

<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:** [October 18, 2023, 12:17am UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/171 "2023-10-18T00:17:39Z")

</div>

Times are not possible in numeric format (inside Homey).  
So you can convert it yourself when you need it as a numeric value.

(If this is offtopic, I’ll move it somewhere else)

With 3 variables and logics cards:

 ![Screenshot from 2023-10-18 01-10-25](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/0/00c9ce7eea0f70d4815992d31974d62956278774.png)

Or with a Homeyscript card “Run code with argument and return number-tag”,  
and it creates a Homeyscript tag you can use in other flows:

 ![Screenshot from 2023-10-18 02-33-00](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/b/ab538108e3d44d54c9de4c8432a08b514b4098b7.png)

---

<div class="post-metadata">

**Author:** ![Jeroen\_W](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_w/32/9803_2.png) [@Jeroen\_W](https://community.homey.app/u/Jeroen_W)\
**Post date:** [October 18, 2023, 6:04am UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/172 "2023-10-18T06:04:07Z")

</div>

That’s a neat solution 😃 and something I can work with.

---

<div class="post-metadata">

**Author:** ![JosDeBoss](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/josdeboss/32/81235_2.png) [@JosDeBoss](https://community.homey.app/u/JosDeBoss)\
**Post date:** [December 7, 2023, 3:19pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/173 "2023-12-07T15:19:41Z")

</div>

How is it possible that Morning Goldenhour Ends got triggered in the afternoon?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/0/b0a661095a1d30706113f26405e229616077b96c.png)

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [December 7, 2023, 8:24pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/174 "2023-12-07T20:24:42Z")

</div>

Looks like it is the morning. (9.25)

---

<div class="post-metadata">

**Author:** ![JosDeBoss](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/josdeboss/32/81235_2.png) [@JosDeBoss](https://community.homey.app/u/JosDeBoss)\
**Post date:** [December 7, 2023, 9:00pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/175 "2023-12-07T21:00:57Z")

</div>

Hm very strange. I have a simple flow that sends me a notification on that trigger. I guess the message had to be delayed delivery I guess…

Guess it’s OK then. Cheers.

---

<div class="post-metadata">

**Author:** ![naehle](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/naehle/32/79073_2.png) [@naehle](https://community.homey.app/u/naehle)\
**Post date:** [January 7, 2024, 5:19pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/176 "2024-01-07T17:19:52Z")

</div>

Hi there, I am struggling with setting up a flow turning on the outdoor lights within and for a certain time period and turning them off outside of the time corridors.  
This is the flow that doesn’t work:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/9/7953ae54ab4cba3b3448a3fb6b678c80214407c5.jpeg)  
I also have a flow checking every 5 minutes if the current time is within those corridors, that flow runs just fine but it is somewhat against the idea of using sun events… 😉

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [January 7, 2024, 8:15pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/177 "2024-01-07T20:15:55Z")

</div>

What is not working?  
On or off and what flow exactly

IF Night ends (06:39)  
AND It is between 06:39 and 08:44  
THEN Light On  
OR Light Off

06:39 is not between 06:39 and 08:44 so it will turn off the light.

IF Sunset (16:39)  
AND Time before 18:10  
THEN Light On. THis works

If you use a ofset of -1 for the IF Night ends then is it between Night ends and Sunrise ends, then the light will turn on.

I hope i have it at the right end.  
Correct me if i am wrong.

---

<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 7, 2024, 8:57pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/178 "2024-01-07T20:57:34Z")

</div>

> [@naehle](#):
>
> turning on the outdoor lights within and for a certain time period and turning them off outside of the time corridors

Start with the basics I would say, with this flow the light is on during darkness only. What do you miss in this flow? Because we can add that later on:

 ![Screenshot from 2024-01-07 21-55-58](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/b/2bf798010bb8f54a5cc8f54a96ad2c2973e4f4a2.png)

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [January 7, 2024, 11:08pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/179 "2024-01-07T23:08:52Z")

</div>

@MarcelT , does this functionality works for you ? Unfortunately I’m getting error : **Cannot read properties of undefined (reading ‘toLowerCase’)`**

![sunevents](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/2/925d8e33a06de2f0d75e2a592f0af0cd6e3bc31d.png)

`Server HTTP GET /manager/flow/flowcardcondition/homey:app:com.cyclone-software.sunevents/homey:app:com.cyclone-software.sunevents:cond_special_day/autocomplete → Error 500: Cannot read properties of undefined (reading 'toLowerCase')`

Thank you.

---

<div class="post-metadata">

**Author:** ![naehle](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/naehle/32/79073_2.png) [@naehle](https://community.homey.app/u/naehle)\
**Post date:** [January 13, 2024, 1:30pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/180 "2024-01-13T13:30:29Z")

</div>

I needed four light on - off periods (on around 8 am, off during the day, on in the evening, and off during the night), and I was assuming that events continue to be fullfilled once fulfilled, so just two flows in one smart flow would suffice… they appearently don’t.  
The flow turned on the light at “night ends” , but didn´t turn it off during the day…  
So I created 4 flows in one smart flow, everything works fine now.

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [January 13, 2024, 9:40pm UTC](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043/181 "2024-01-13T21:40:52Z")

</div>

@Sharkys Works for me. Do you have the latest test version?

[Previous page](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043.md?page=8)

[Next page](https://community.homey.app/t/app-pro-sun-events-triggers-you-at-certain-positions-of-the-sun/71043.md?page=10)
