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

Fix NWS twice_daily forecast day/night detection #97703

Merged
merged 1 commit into from Aug 3, 2023

Conversation

karwosts
Copy link
Contributor

@karwosts karwosts commented Aug 3, 2023

Proposed change

In 2023.8, a standard is_daytime attribute was added to the weather platform (#75219). Also frontend weather was changed from looking for daytime attribute to is_daytime attribute.

NWS still uses daytime boolean for twice_daily forecast, meaning the frontend no longer recognizes the day/night information provided by NWS, so now it reports both day and night as "day".

image

image

Fix by change NWS to use the standard is_daytime attribute instead of daytime attribute.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Aug 3, 2023

Hey there @MatthewFlamm, @kamiyo, mind taking a look at this pull request 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 pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign nws Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@frenck frenck added this to the 2023.8.1 milestone Aug 3, 2023
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @karwosts 👍

As this is an error caused by a regression in our own base platform (and released broken right now), I'm going to override the codeowner approval to get this into the very next patch release.

../Frenck

@frenck frenck merged commit 9e7872e into home-assistant:dev Aug 3, 2023
20 of 21 checks passed
@karwosts karwosts deleted the fix-nws-daynight branch August 3, 2023 19:19
@MatthewFlamm
Copy link
Contributor

LGTM anyway, tested locally. Important to have this fixed while we update this integration with the new model. Thanks!

@frenck
Copy link
Member

frenck commented Aug 3, 2023

Awesome, thanks for the confirmation there @MatthewFlamm ❤️

@frenck frenck mentioned this pull request Aug 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants