Why are the sunrise and sunset times wrong?

Home Assistant uses the Astral package (currently v2.2) to calculate sun-related data & events. Some of the data it requests from the package require an “observer elevation.” In these cases, HA provides its elevation config value.

As mentioned previously, the value provided to the package should be the observer’s “elevation above ground level.” See Effect of Elevation from Astral’s documentation for more detail.

However, the HA documentation says the elevation configuration parameter is “Altitude above sea level in meters. Impacts sunrise data.” That seems like a documentation defect. I would think it should say “elevation above ground level.” (Honestly, I never noticed this before!)

But, having said that, there are at least five built-in integrations (medcom_ble, airthings_ble, met_eireann, openuv & met) that also use the elevation configuration parameter. I have no idea what they assume the value means.

I think the only thing that is agreed on is that the value is in meters!

1 Like