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
72.17k stars 30.2k forks source link

National Weather Service (NWS) Integration does Not Return Forecasts due to Python Issue #121408

Closed indomitableMan closed 2 months ago

indomitableMan commented 3 months ago

The problem

When attempting to use the National Weather Service (NWS) Integration to get either Hourly or Twice-Daily forecasts using the Weather: Get forecasts call - no information is returned and an "unknown error" message is displayed in the HA web UI.

What version of Home Assistant Core has the issue?

core-2024.6.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

National Weather Service (NWS)

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nws

Diagnostics information

home-assistant-log-NWS-issue.txt

Example YAML snippet

service: weather.get_forecasts
target:
  entity_id:
    - weather.kbos
data:
  type: twice_daily

Anything in the logs that might be useful for us?

No response

Additional information

The underlying issue appears to be a change in the Python 3.12 pynws package in the file simple_nws.py on line 181 that causes any request for a forecast to the National Weather Service to fail.

home-assistant[bot] commented 3 months ago

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

Code owner commands Code owners of `nws` 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 nws` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


nws documentation nws source (message by IssueLinks)

kamiyo commented 3 months ago

Have you tried upgrading to core 2024.7.1? I can't check the earlier core version, but the latest one works fine for multiple stations that I've tried.

Human commented 3 months ago

FWIW, I had this issue in 2024.6.x, and it is indeed fixed for me in 2024.7.1.

MatthewFlamm commented 2 months ago

It is also fixed for me in 2024.7.x. Will close this based on multiple reports of it being fixed.

MatthewFlamm commented 2 months ago

@home-assistant close