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

Rain estimates from homeassistant service call are off from merrysky.net values by an order of magnitude #166

Closed
7 tasks done
K-Money opened this issue Dec 19, 2023 · 5 comments · Fixed by #168
Closed
7 tasks done
Assignees
Labels
bug Something isn't working

Comments

@K-Money
Copy link

K-Money commented Dec 19, 2023

Describe the bug

Rain estimates have been extremely off in my area (e.g. predicting 11.31 inches of rain when merrysky.net says 1.2 and accuweather says 1.02).

Expected behavior

Rain values that match with merrysky.net (e.g. 1.2 inches)

Actual behavior

Rain values extremely different from merrysky.net (e.g. 11.31 inches)

Home Assistant version

2023.12.3

Integration version

1.3.5

Other details

Below is the service call, its response, and a screenshot of the merrysky info for the same duration. USA zip code 90706.

I originally added this as an issue on the wrong repository and cloneofghosts indicated that this line might be the culprit.

service: weather.get_forecasts
target:
  entity_id: weather.pirateweather
data:
  type: daily
response_variable: daily_forecast
weather.pirateweather:
  forecast:
    - datetime: "2023-12-18T08:00:00+00:00"
      condition: rainy
      precipitation_probability: 21
      cloud_coverage: 84
      wind_bearing: 173
      temperature: 73
      templow: 57
      wind_speed: 3.78
      precipitation: 0.27
      humidity: 58
    - datetime: "2023-12-19T08:00:00+00:00"
      condition: rainy
      precipitation_probability: 80
      cloud_coverage: 100
      wind_bearing: 140
      temperature: 63
      templow: 57
      wind_speed: 4.97
      precipitation: 2.61
      humidity: 91
    - datetime: "2023-12-20T08:00:00+00:00"
      condition: rainy
      precipitation_probability: 98
      cloud_coverage: 87
      wind_bearing: 131
      temperature: 62
      templow: 57
      wind_speed: 8.19
      precipitation: 6.47
      humidity: 82
    - datetime: "2023-12-21T08:00:00+00:00"
      condition: rainy
      precipitation_probability: 98
      cloud_coverage: 91
      wind_bearing: 101
      temperature: 60
      templow: 56
      wind_speed: 8.84
      precipitation: 11.31
      humidity: 83
    - datetime: "2023-12-22T08:00:00+00:00"
      condition: rainy
      precipitation_probability: 68
      cloud_coverage: 63
      wind_bearing: 181
      temperature: 63
      templow: 54
      wind_speed: 4.16
      precipitation: 2.45
      humidity: 68
    - datetime: "2023-12-23T08:00:00+00:00"
      condition: sunny
      precipitation_probability: 2
      cloud_coverage: 9
      wind_bearing: 104
      temperature: 61
      templow: 51
      wind_speed: 3.76
      precipitation: 0
      humidity: 57
    - datetime: "2023-12-24T08:00:00+00:00"
      condition: sunny
      precipitation_probability: 1
      cloud_coverage: 5
      wind_bearing: 168
      temperature: 60
      templow: 51
      wind_speed: 3.65
      precipitation: 0
      humidity: 40
    - datetime: "2023-12-25T08:00:00+00:00"
      condition: sunny
      precipitation_probability: 3
      cloud_coverage: 12
      wind_bearing: 130
      temperature: 62
      templow: 54
      wind_speed: 4.07
      precipitation: 0
      humidity: 28
  HA Precip Prob HA Precip Amount Merrysky.net Amount Ratio Offset
12/18/23 21 0.27 0.04 6.75 0.23
12/19/23 80 2.61 0.03 87 2.58
12/20/23 98 6.47 0.7 9.24 5.77
12/21/23 98 11.31 1.2 9.425 10.11
12/22/23 68 2.45 0.2 12.25 2.25
12/23/23 2 0 0    
12/24/23 1 0 0    
12/25/23 3 0      

MerrySky

Troubleshooting steps

  • I have updated my Home Assistant installation to the latest version.
  • I have updated the Pirate Weather Integration to the latest version.
  • I have gone through the documentation, parameter documentation and sensor documentation before opening this issue.
  • I have searched this repository and Pirate Weather Repository to see if the issue has already been reported.
  • I have restarted my Home Assistant installation.
  • I have checked to see if the issue is not an API issue.
  • I have written an informative title.
@cloneofghosts
Copy link
Collaborator

cloneofghosts commented Jan 3, 2024

@alexander0042 I suspect the change made in #122 may also be affecting things here. Not sure what the best solution is as in metric precipAccumulation is in cm while HA reports them in mm. A quick fix might be to change the daily units in metric to be cm and a long term fix would be to change the API so its being reported in mm?

EDIT: Was looking through the code and found the issue. Will create a PR for you to review.

@cloneofghosts
Copy link
Collaborator

Hi @K-Money I've created a PR which should fix the issue but while we wait for it to be merged I've created a beta release which should fix the issue that you can test to confirm the issue is fixed.

@K-Money
Copy link
Author

K-Money commented Jan 4, 2024

@cloneofghosts Awesome, thank you! I've loaded it in my home assistant instance but there's not really any rain in the forecast at the moment. I'll keep an eye on it and report back when some rain shows in the forecast so I can make an actual verification. Thanks again!

@cloneofghosts
Copy link
Collaborator

I released another beta this morning as I realized that the conversion from cm to mm was incorrect. It was converting by a factor of 100 instead of 10 so hopefully that fix combined with the other one fixes things for you.

@cloneofghosts
Copy link
Collaborator

cloneofghosts commented Jan 5, 2024

I've gone ahead and merged the PR since the dev seems to be prioritizing version 2.0 of the API. The release will continue as a beta version for a while longer to confirm that the issue is fixed.

I'm going to open a separate issue shortly for feedback on the fix so feel free to comment there.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

3 participants