Issue with sunrise offset

Hello Pierre-Gilles

Hello everyone,

It’s great to have the option to set an offset directly on sunrise/sunset, but I’ve noticed a small bug, probably since the latest versions. For my part, morning opening scenes with a « after » delay of 5 minutes or without an offset no longer trigger.

I specify that:

  • evening scenes with a +15 minute offset work,
  • my location is correctly set,
  • the time zone is also correct,

See my logs which indicate that the opening calculation is done in the past.

Am I the only one having this problem?

Thanks for your feedback

DamienLogs sunrise

Hello (and welcome)

I’ve moved your message to a new conversation to handle the issue here.
I can’t retrieve your logs. I’ll still check if there’s a difference in the code between morning and evening :thinking:

Can you put them on https://pastebin.com/ ? and share the link here?

There is indeed a bug. I’m testing a fix today (well, tomorrow :sweat_smile: for sunrise :smiling_face_with_sunglasses:) and I’ll keep you posted.

Hi cicoub13,

Thanks for your quick response… I’m actually taking the train on the way in the community :slight_smile: .

Here’s the link to the logs: Gladys sunrise scene not scheduled - Pastebin.com

Have a great day

It’s good, it works :sunrise:

@pierre-gilles Could you take a look at the PR when you have time?

Thanks for the PR @cicoub13!

I’ve left a review here: fix(scene): Fix issue with next sunrise trigger by cicoub13 · Pull Request #2548 · GladysAssistant/Gladys · GitHub

I think the root issue is elsewhere, we have a timezone bug in the dailyUpdate I think

Okay, thanks, I’ll check (Monday)

You were right. I fixed the PR and the test is conclusive this morning

Thanks! That’s good for me, it’s merged and it will go out in the next version of Gladys :slight_smile:

@Damien_D Thanks for your feedback, the fix is available in Gladys Assistant 4.80:

I’ve installed version 4.80 and confirm that scenes triggered at sunrise/sunset are working properly.

Happy to have been able to contribute modestly to the detection of the issue and thank you especially for resolving it quickly :waving_hand:

Thanks for your feedback, that’s what makes Gladys progress :raising_hands: