-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
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 missing dew point and humidity in tomorrowio forecasts #99793
Fix missing dew point and humidity in tomorrowio forecasts #99793
Conversation
Hey there @raman325, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
should we add tests for these attributes? I think we check all the other ones in the tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add tests for these attributes -> we should do this in general to minimize the chances of this happening in the future
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Tests were added with the original commit. Unfortunately, the existing tests ignore the logic to construct the tomorrow.io API request and always return the contents of v4.json. This is not a new problem or related to these changes. |
Gotcha, should we then add a test that captures the API request and validates the fields in the payload? I took a brief look at the available mocks and I'm actually not sure if this is possible but I could be wrong. |
Edit: disregard previous. I added an assertion to ensure that we're sending the proper args to |
"dewPoint", | ||
"humidity", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, dewPoint
and humidity
aren't very useful for forecasts other than hourly intervals (or less) since HA doesn't have min/max values for them and, even if it did, they still wouldn't be very useful since they won't necessarily coincide with the daily high/low temperatures. But to avoid extra API calls, this is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha, just another reason why this API can be so frustrating to use!
41b119e
to
b5a9062
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding the assertion, good way to ensure we don't run into an issue like this again!
* Fix missing dew point and humidity in tomorrowio forecasts * Add assertion for correct parameters to realtime_and_all_forecasts method
Breaking change
Proposed change
Humidity and dew point were added to the tomorrow.io forecasts in 2023.9.0 but they aren't working as two lines were missed in the original commits.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: