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

Get planet positions as sensors #15

Open
Madelena opened this issue May 17, 2022 · 3 comments
Open

Get planet positions as sensors #15

Madelena opened this issue May 17, 2022 · 3 comments

Comments

@Madelena
Copy link

Madelena commented May 17, 2022

Since this integration is already calculating the positions of the planets, it would be nice to have it provide sensors for the:

  • current visibility
  • current direction
  • current altitude
  • today's and next rise times and directions
  • today's and next meridian times and directions, and
  • today's and next set times and directions

of each planet, dwarf planet, the sun, and the moon.

An example would be something like this: https://www.timeanddate.com/astronomy/night/usa/new-york

Planet Information

@partofthething
Copy link
Owner

partofthething commented May 18, 2022

Excellent idea! We definitely already calculate direction and altitude, so that would indeed be relatively easy to expose. Rise, median, and set times would take a little more computation to follow the curves and estimate when those happen. There's a utility in skyfield to do this (https://rhodesmill.org/skyfield/almanac.html#risings-and-settings) so that would be easy enough to code up as well. I'd be interested in supporting this or reviewing a PR if anyone wants to contribute it.

@Tom-ahawk
Copy link

Please consider making an “down sized” integration which creates a sensor with basic information about the moons position (azimuth, elevation etc.) and phase. Or the possibility to select in the integration interface which planet to select (ex. just the moon). - Maybe this will then make the CPU load lower ?
Then this sensor(s) can be used in other cards.

@mdisabato
Copy link

@Tom-ahawk,

HA has an integration that does this already. Also AstroWeather (https://github.com/mawinkler/astroweather) will provide you with a huge amount of data, not just the moon phase.

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

4 participants