Sun integration is 24 min ahead the time.nist.gov servers

I’m having an issue with the sun integration. Midnight on sun integration is 24 min fast than midnight on http://time.nist.gov/. [ EST]. Any suggestion? I believe I’ve looked everywhere, but that’s probably incorrect!!!

I’m using core-2021.11.1 I got my “Home” gps coordinates from iPhone 12 using the device tracker info therefore several decimal places and Google Maps agree with all the above. My system clock use a time.nist.gov server which matches all of my Mac’s… , not sure if that will make any difference.

Where on nist.time.gov are you seeing the number for your area? Can you post the time from you HA and what nist says please.

FWIW, I’m on the only links I could find from nist.time.gov that calculate these numbers, however they do not calculate midnight. I’m in EST and all values match the calculations aside from midnight (because it’s missing from the site). This is why I’m asking where you’re getting the numbers from.

https://gml.noaa.gov/grad/solcalc/

Sorry for the delay

time-a-g.nist.gov - specific server

can you just show what the numbers are? I don’t have the ability to grab the values from that server.

I’m EST as well:

next_dawn: 2021-11-21T11:44:21.744534+00:00
next_dusk: 2021-11-20T23:04:22.194173+00:00
next_midnight: 2021-11-21T05:24:19+00:00
next_noon: 2021-11-21T17:24:08+00:00
next_rising: 2021-11-21T12:13:00.053315+00:00
next_setting: 2021-11-20T22:35:47.269966+00:00
elevation: 16.92
azimuth: 230.73
rising: false
friendly_name: Sun

I’m talking about the numbers from the server, not from sun.sun.

You’ve only showed numbers from home assistant. What are the numbers from the server.

You also have to realize that the server may only show information from it’s city. Which of course will be different, which is why I linked the calculator above that nist links to perform the lat/lon calculation. Home assistant matches my location from the calculator perfectly. So the only options in your case are:

  • Server is wrong (unlikely)
  • Server is correct but for whatever city it resides in (likely)
  • Your latitude and longitude are incorrect (unlikely as you stated above)
  • Home assistant’s calculations is wrong (Unlikely as this was already vetted and changed in the past to be exact, theres a whole thread about it)

I understand what you are saying. I need a little time to remember how to get the actual numbers from nist. Thanks for the help, I will post the numbers soon.

If you’re close to the EST / CST border, you’re time is going to be closer to 12:30. If you’re in the center of EST, its going to be 12: and if you’re in Maine, it’ll be closer to 11:30.

Put your Lat/Lon in the calculator I linked above which is the calculator nist links to.

Yep, Im in Atlanta about 100 miles from the CST. I was coming to the conclusion you are describing when I started the thread.

So maybe my question is: How do I get an automation to trigger at midnight in the Eastern TZ. That what I was looking for. I’ll read soon more!! Thanks, but I may be back.

Hmmm, that is a good question. I’m not sure it can be done. Unless you can explain how to get the TZ from that server. The nist site doesn’t really say much about that. I’d be willing to bet theres a rest endpoint somewhere that does this calculation based on lat/lon and all you need to do is find it and use EST lat/lon

Home assistant only outputs your home location.

This integration also outputs sun info, but I don’t think you can configure a lat/lon

EDIT: NEvermind you can.

  - platform: sun2
    entity_namespace: London
    latitude: 51.50739529645933
    longitude: -0.12767666584664272
    time_zone: Europe/London
    elevation: 11
    monitored_conditions:
      - solar_midnight

You are in est yes? Then you need a time trigger

Thanks I just got the (https://www.esrl.noaa.gov/) . Thanks

It’s as important to know what you can’t do as what you can!! Thanks for this as well!

he wants the solar midnight for the EST timezone, which is some random ass time between 12:30 and 11:30

Why diesn’t he say he wants solar midnight then?