Sun Events Apps not working like expected after 24:00

Hi guys I want to use the app Sun Events.
Its a great App but the one card I want to use has a limitation that I really want to add.

I want to use the card its between event " sunset " and “sunrise” to turn on the lights in the dark hours.

But the problem is that after 24:00 the card thinks that the" sunset part is the sunset of the next day, causing the card to give negative output in the dark hours.

I wonder if there is a possiblity to put an additional variable like “sunset of yesterday”?

I don’t checked it myself, but it in my opinion maybe it seems to be a bug. So why don’t you ask in the appropriate topic?

It’s NOT between sunrise and sunset is the solution.

Can you just use them separately? Meaning “Before Sunrise OR After Sunset” because this will always be the “dark hours”.

Or a negative case:

(right clicking and selecting invert if you like it better this way)

1 Like

Staef, you could put a AND card use negative but i dont think that this is the propper way to do it.
The reason is given by this example. Let say it 6 am and sunrise is at 8 am.

Given that the app after 24:00 rewrites the sunset hour variable to the current date. When asked is it after sunset, it wil provide the answer “NO” because its 6AM of that day just at the moment that you want it to be yes. So you are comparing with the wrong date and hour. So inverting it would not be ideal.

If inverted let say the sunset is at 5 pm and its currently 6 pm the time and date does match but by asking “is it after sunset?” will provide a negative while it should be positive.

Ofcourse you can put in a time check so it can ask the right question at the right time an storing the time in a variable. But my experience doing so has been an uphill challenge in Homey due to class type of storing time.

The propper way in my opinion is asking the developer to built a variable that store the date and time of the previous event after 24:00. So you can compare with right variables.

dont know if the topic reaches the developer.

I’m sticking with my answer that if you want to check if it’s “dark” at your current location and time all three of my options will correctly achieve that.

1 Like

The native sun rise / set flowcards work the same.
At 23:59
—Is it after sunrise: yes, the sun rose this morning
At 0:00 (a brand new day has started)
—Is it after sunrise: no. While now, it is before sunrise of the current (new) day

Idk, but Dirk pointed you to use the app topic and linked to it as well:

When you post in the app topic, made by the developer, the developer will get notified by default.

1 Like

@BIRDY, users offer you solutions to your problem that will definitely work. And you ask if this is the right way instead of trying out the suggestions that lead to the result you want?
In my first post, I already pointed out that, if it’s a bug, please contact the app developer in the corresponding post which I linked. Do you even read what other users write?

So, do you want to discuss with us how it should work? Do you want the app developer to contact you because you may have found a bug?

The proper way is to think in non ambiguous guestions :grin:. As you already find out “is it after sunset” is ambiguous and “is it dark” is just yes or no.
You can also use the AND card “it’s daytime” and revert it so it becomes “it’s nighttime”.

I think there has been miss understanding. Thanks for the suggestions they are all appreciated.

I just had an idea for improvement of the app.
If we had such variable you would not need to built logic like that, it would be a plug and play in any flow. Thanks for the input.

The same problem existed, or still exists, if you use a time card, e.g. “Time is between 22:00 and 06:00 o’clock”. That was or is still a problem with Homey. Since then I have always used a card with “Is not between” e.g. “Time is not between 06:00 and 22:00 o’clock”. I understand, it shouldn’t be like this but this works perfectly, as no day change has to be taken into account. So it might be, that the problem with the sun events app is caused by Homey.
I also reported the bug to Athom, but I don’t know if it’s still there. Didn’t tested it.

I don’t think this issues are bugs, but different ways of thinking of people, so no common understanding. So that’s where documentation describing the function becomes important :wink:.
See for example the text in the app Sun Events(Zonnestanden):

BREAKING CHANGES:

  • The Sun Events for tommorow are removed. As the function between will never work because if you have a function between sunset today and sunrise tomorrow. After midnight the sunrise today will be tomorrow, this end up in not something we want :slight_smile: So the function between can only handle events that happen today.*

Good to know that the Sun Events App doesn’t support “Between today and tomorrow”.
But, the Homey build in time flow cards do:

image
(Translation: If the second time is before the first time, the next day is assumed)

And because “Between sunset and sunrise” is also only about times, this should also work.

But as I wrote already, “Time is between 22:00 and 06:00 o’clock” didn’t work either. I don’t know if it’s work now.