home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.83k stars 30.08k forks source link

Moon phase is incorrect #101086

Closed def1149 closed 8 months ago

def1149 commented 1 year ago

The problem

I live in Tennessee and tonight 9/28/2023 7:93 PM CST I have a nearly full moon but the application calls this a waxing gibbous moon.

This site https://www.timeanddate.com/moon/phases/ reports 99.7% full moon.

I think you need to adjust something

What version of Home Assistant Core has the issue?

core-2023.9.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

No response

Link to integration documentation on our website

No response

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

elijahmcneish commented 1 year ago

The Moon integration calls the Astral library's moon.phase method, which returns the current phase in days:

https://astral.readthedocs.io/en/latest/#phase

The integration does not interpret this as a full moon until that number hits 14.5:

https://github.com/home-assistant/core/blob/f5d8d41ad51a3632be13431ec87d4d7b38d6024f/homeassistant/components/moon/sensor.py#L75C1-L91C60

So right now it's reporting a waxing gibbous moon because that's what phase we are in. It won't be a full moon until early tomorrow morning, at which time the phase entity will reflect that.

home-assistant[bot] commented 1 year ago

Hey there @fabaff, @frenck, mind taking a look at this issue as it has been labeled with an integration (moon) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `moon` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign moon` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


moon documentation moon source (message by IssueLinks)

xiuhuiwang commented 11 months ago

@homeassistant claim I am working on this.

issue-triage-workflows[bot] commented 8 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.