fix parsing of feels like for weathergov#2810
fix parsing of feels like for weathergov#2810MichMich merged 1 commit intoMagicMirrorOrg:developfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2810 +/- ##
===========================================
- Coverage 65.26% 64.91% -0.36%
===========================================
Files 8 8
Lines 285 285
===========================================
- Hits 186 185 -1
- Misses 99 100 +1
Continue to review full report at Codecov.
|
|
Thanks for the PR. Might it be usefull to check first for apparentTemperature so that IF it is provided it is used for the feelsLike value? And if not, then the other values are taken into account? |
|
I think I was actually mistaken with the link I included for the reference. That one only refers to the |
|
Thanks for your contribution! My apologies for my slow response. Life got in the way. |
weather.gov API does not seem to consistently provide a feels like value. The API specs mention an
apparentTemperaturevalue, which seems to not be provided most of the time in responses. There is a consistent value ofwindChillandheatIndex, which according to docs, only has a value when the value falls within a certain threshold.Before this fix, feels like would only be read from
heatIndexand it would be coerced to 0 if the value wasnull, thus showing a consistent feels like temp of 0 celsius/ 32 fahrenheit.This pull request uses either
windChillorheatIndexfor feels like temp if one of them is available. If none are available, it will fall back to the current actual temperature.