Skip to content

Convert dew point units to match temperature units#119

Merged
MatthewFlamm merged 5 commits into
MatthewFlamm:masterfrom
lymanepp:master
Jul 3, 2023
Merged

Convert dew point units to match temperature units#119
MatthewFlamm merged 5 commits into
MatthewFlamm:masterfrom
lymanepp:master

Conversation

@lymanepp
Copy link
Copy Markdown
Collaborator

@lymanepp lymanepp commented Jul 2, 2023

I noticed that the dew point units don't match the temperature:

"dewpoint": {
    "unitCode": "wmoUnit:degC",
    "value": 22.222222222222221
},

Ideally, the pynws API would use Celsius for all response values. But some of the NWS responses contain values in strings such as: Showers and thunderstorms likely. Mostly sunny. High near 98, with temperatures falling to around 95 in the afternoon. Heat index values as high as 106. Southwest wind 5 to 10 mph. Chance of precipitation is 60%. New rainfall amounts less than a tenth of an inch possible.

So making all degree units in a forecast response match the temperature seems like the least-bad approach.

@MatthewFlamm
Copy link
Copy Markdown
Owner

This LGTM. Thanks! This project doesn't do a very good job with integers vs. float, particularly when there are conversions. This PR is consistent with the current code though.

@MatthewFlamm MatthewFlamm merged commit 8b97d6b into MatthewFlamm:master Jul 3, 2023
@MatthewFlamm
Copy link
Copy Markdown
Owner

Unless there is anything else you intend to add, I can make a release.

@lymanepp
Copy link
Copy Markdown
Collaborator Author

lymanepp commented Jul 3, 2023

I don't have any other changes. Ready for a release that I can use to update the HA PR. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants