The Sun Service is One Hour ahead

Hello all

I Hope you are Well.

I have noticed that the Sun Service is One Hour ahead.

For example, if it is 20:00 the Sun Service says that the Next Midnight is in 5 Hours which would be 01:00.

The same goes for Sunrise, Sunset and the other options too.

My Location is Set correctly as is my Timezone, GMT London +0

Any suggestions?

Thanks in advance

Kevin

The next midnight value as delivered by the sun integration is about the solar midnight, which is the point in time equidistant from sunset and sunrise, based on your geographical location. So this most of the time is not at 00:00 on the clock.
See: Midnight and Sun.

2 Likes

Hello

Thanks for the Reply.

So, if I have an Automation that I want to Trigger at Sunset, how would I configure that if the Sun Service thinks it is One Hour later than it is?

Thanks in advance

Kevin

Are you sure this is right? In London the current timezone is UTC+1 afaik due to DST. How do you come to the conclusion sunrise is one hour off?

Hello

There is only One Setting in the Home Settings for London and that is for +0.

Thanks

Kevin

How do you make the comparison?
Are you entering a time and comparing that to the next sunrise?

how did you determine that the sun was off by an hour?

Hello

I opened the Sun Service and looked at the Entities.

It lists all of them and they are all off by One Hour.

Thanks

Kevin

Are you sure you selected the correct timezone there are two:

  • GMT+0 GMT - No Daylight savings
  • GMT+0 London

Take a screenshot please.

Have you rebooted?
Any NTP issues?

Hello

I am not sure which Screenshots you require, so, I have done two, one of the Sun Service Entities and one of the Home Settings showing the Timezone.

The Screenshots were taken at approximately 08:30.

Thanks

Kevin

Hello

There are no NTP Issues and I have tried Rebooting with no change.

Thanks

Kevin

Your home location has to be wrong then. Make sure that’s set properly

If you’re in London (or anywhere else in the UK right on the Greenwich meridian line) then ‘local midnight’ for you during winter would occur at exactly 00:00 so during daylight savings time (one hour ahead) it would occur at 01:00 if I’ve understood it right? So it sounds like it’s working correctly?

He might have a point about the sun being off by an hour. Just had a look at mine & it shows next noon is at 13:00. It was noon 40 mins ago

I’m dumb. See post below.

All world time is based on UTC from an atomic clock, but this is (currently) still aligned to GMT from the average (mean) time of the transit of the sun across the prime meridian at Greenwich Observatory.

Noon, or midday, is defined as 12:00 on clocks, and the year-average time when the sun is at peak solar. This time moves by -16/+15 minutes across the seasons due to the off-alignment of the axis of the earth’s rotation to the orbit plane around the sun. It is also different by +1hour per 15 degrees longitude west.

Due to the invention and adoption of Daylight Savings Time, many mid-latitude countries put the local clock time forwards one hour during the summer period. This, for the UK, means that when the sun is at peak, it is around 12:00 GMT but 13:00 local BST. At London latitude, sunrise-sunset across the year ranges from approximately 08:00-16:00 at winter solstice, to 04:00-20:00 at summer solstice. Due to DST, in summer this becomes 05:00-21:00, which gives the ‘extra’ one hour of apparent daylight.

If you wish to check any of the HA values, then I use www.suncalc.org
which shows sun event times and path details for any location, both live and for times in the past and future. It is very easy to centre the map onto your precise location, and the site uses location-timezone lookup to identify your local time as well as DST applicability. You will see, if you select ‘now’ that noon for a location in the UK is around 13:00, but if you change the date to say 18 March then noon jumps back to 12:00 as DST only starts at the last Sunday in March.

Comparing HA and other systems with suncalc should be very accurate for solar noon if you have your location in HA set correctly, however sunrise may well differ very slightly, since different routines will use the formal centre of the sun being visible at the horizon for sunrise, or the tip of the sun being visible, which is about 1 minute different.

Naturally, sunrise is defined related to sea level with view of the sea-horizon, so the sun will almost certainly only ‘rise’ locally once the elevation exceeds the local building/terrain horizon.

Also be aware that suncalc in the live /history mode shows sunrise today, whereas HA shows the next sunrise, which is tomorrow after sunrise today, and this will often be +/- 1-3 minutes different day to day.

For me, noon today is 13:09, and suncalc says it is 13:09:26

The solution, to avoid any confusion over UTC to local time, and DST changes, is to move to Iceland, which is one of the few countries to use both UTC (GMT) and not apply DST.

2 Likes

Yep, you’re right @Biscuit. Forgot about the difference between solar noon/midnight & what our clocks say due to DST.

@kncowans the below is incorrect:

Your Sunrise & Sunset times are correct if you compare your screenshots to suncalc or Sunrise and sunset times in London.

Your screenshot shows the next sunrise at 5:55. Site I linked above shows it’s scheduled for 5:56 tomorrow for the general London area. That’s only a minute off, not an hour.

Hello all

Apologies for the Late Reply.

I have no idea why, however, everything seems to be sorted now.

Thanks for all of the Replies, it is appreciated.

Kevin