Open EarlOfBurton opened 2 weeks ago
Hey there @swamp-ig, mind taking a look at this issue as it has been labeled with an integration (sun
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
sun documentation sun source (message by IssueLinks)
The problem
sun.sun calculates wrong timestamps for next_sunrise and so on. It takes elevation of the home location into account that is set in Home Assistant (I mean the "home" elevation in meters above sea level (set in "Settings" -> "System" -> "General" -> "Elevation").
But this generates wrong values. For testing purposes I set the elevation to 0. If I set the elevation value to 0 (which is not correct for my place - correct would be 850 meters), the sun.sun timestamps are correct.
For the correct use of the astral python package it seems that the home assistant home zone elevation should not be taken into account?
But changing to a wrong elevation value (0) is not a workaround for me, because other addons/integrations use the elevation value for calculations.
Discussion with sun2-developer see under: https://community.home-assistant.io/t/next-rising-and-next-setting-still-shows-appr-2-minutes-too-late-gmt-1-central-europe-slovenia/566922
Kind regards
What version of Home Assistant Core has the issue?
core-2024.3.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
sun
Link to integration documentation on our website
https://www.home-assistant.io/integrations/sun/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response