pirate-weather-ha
pirate-weather-ha copied to clipboard
Wind Gust Forecast
Describe the feature
Would it be possible to add wind_gust to the hourly forecast?
Home Assistant version
No response
Integration version
No response
Acknowledgements
- [X] I have searched this repository and API Repository to see if the feature has already been requested.
- [X] This featre request is sepecific to the HA Integration.
- [X] I have written an informative title.
I've created a beta release (v1.4.5) which should add wind gusts to the forecasts. If everything is working without issue then I'll merge in the changes and release the stable version later today.
Wow, you are fast! I'll take a look ASAP this week and let you know. Thank you!
Beta looks good, however two comments/questions:
(1) There are some hours where the wind_gust_speed is less than the wind_speed. Does that make sense? Could it possibly be coming across with the wrong units? The historical sensors do not have this issue.
(2) Do you happen to know if there is a way to request (or store) only the next X hours of forecasts when setting up the template sensor vs. all the many hours that come back as attributes in the response by default?
Thank for the speedy help and good work on this!!
Thanks for testing. I'm going to merge in the changes and then release the stable version. As for your questions:
- I checked the API for my location and I do see some hours where the wind gusts are lower than the wind speed. I saw it occur on the 70th forecast hour. At that point the model used switched from HRRR to GFS. I would assume this is something related to the weather model used and is more of an issue with the API itself rather than a HA issue.
- You're talking about setting up a template using weather.get_forecasts? If so you can change the forecast attribute to something like this
forecast: "{{ hourly['weather.pirateweather'].forecast[:24] }}"
and it will only give you an hourly forecast for the next 24h. Change 24 to the number of forecast hours you wish to get in the template.
Awesome - thanks for the second tip! As for the first issue, you are probably right. Unfortunately, there does seem to be something strange going on with the forecasted wind gust data.
What I plotted in HA:
What is currently shown on Merry Sky:
Among the strange things... the Merry Sky view shows gusts up to 34mph but what I see in HA goes up to only 14.5. Perhaps it's due to caching on their end, I'm not sure. It's also a bit odd the disconnect between history and forecast at the point of transition.
Looking at your graph it seems like it isn't converting the wind gusts from m/s to mph. If I convert 14.5 m/s to mph I get 32.43558 mph which is close to what Merry Sky is showing you.
What I find really weird is the wind gusts are being converted to mph in the current conditions and not the forecasts. It's quite possible that I missed something when I set this up. I'll try and take a look later to see if I can figure anything out but I'll also ping @alexander0042 to see if he can take a look as well.
Any discoveries as of yet?
I actually was able to figure out what the issue was thanks to the future branch. I will release a new version with the fix shortly. The beta version with the fix uses the V2 beta API.
New version released which should hopefully fix this issue for you.
You are the man! Looks great now. Thanks a ton!