Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: Sun elevation will not reach -12.000000 again until 2020-07-28 #18

Closed
palengh opened this issue May 26, 2020 · 3 comments
Closed

Comments

@palengh
Copy link

palengh commented May 26, 2020

Thank you for a nice add-on to HA, @pnbruckner.
I would not call this an error, nor would I expect a WARNING for the fact the sun will not be lower than -12 or -18 in the summer months.

I live in the Oslo region, at 59 degrees North.
We love the long summer nights up here :-)
2020-05-24 22:50:20 WARNING (MainThread) [custom_components.sun2.binary_sensor] Sun elevation will not reach -12.000000 again until 2020-07-28 2020-05-24 22:50:20 WARNING (MainThread) [custom_components.sun2.binary_sensor] Sun elevation will not reach -18.000000 again until 2020-08-18

@pnbruckner
Copy link
Owner

It's only a warning because some people may have automations, etc. that use the binary sensor to make something happen and expect it to do so daily. The warning should only happen once when the sensor updates and notices that the next update will happen more than 24 hours in the future. And, of course, it will also happen once at startup if HA is restarted.

Do you really see this as a problem?

@palengh
Copy link
Author

palengh commented May 29, 2020

Not A problem at all.
I was just surprised to receive the notice in the log because it’s normal around here to have long days in the summer.

I assume the same info is presented the other way around; when the sun is not reaching altitude, eg. 6 degrees until February x, which is equally common at these latitudes.

@Moonbase59
Copy link

Moonbase59 commented Jun 12, 2020

That’s actually nice (and good that you calculate taking the polar regions into account). Remember it was quite some calculations (and returning 'None' values) when I built my astronomy stuff back in the days.

No night in Hamburg when I took that screenshot:
No night in Hamburg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants