My goal: I would like to know the maximum forecasted wind speed for the next 8 hours, to determine if I can leave the window screens down for the night. I am confused about the units for wind speed.
E.g. for the next hour, the forecasted wind speed shows as 24,42. But what unit? If this is m/s, a big storm is coming, but it's not. It could be km/h? Or mph?
The documentation for OneCall API v3 mentions there are three possible units:
standard = m/s
metric = m/s
imperial = mph
But it does not seem possible to choose a unit type with the HA OpenWeatherMap integration.
Funny thing in the regular (not-forecasted) values of OpenWeatherMap:
So two different units for wind speed and wind gust. And km/h should not come straight from the API, it would have to be converted somewhere. Which does not make sense to me.
Has anyone made sense of OpenWeatherMap wind speeds and can point me in the right direction? Preferably to get everything in m/s. But understanding what I am seeing would help a lot.
Glad you are doing some planning before starting your coding journey.
Access the live current data via the API, and also via the website. Read the docs. What corresponds to reality?
What are you looking for? Is peak gusts your goal you need to find, or something else? Do the units you measure it in matter, or that it exceeds a certain pre-defined threshold value? Remember the raw data is probably measured by speed of rotation of a spinning anemometer cup somewhere pulsing a sensor, that is itself converted to wind speed, the raw units probably starting off as being rpm.
How to arrive at that value (regardless of how it is expressed) seems to be your current bottleneck. Simple mathematics can easily convert one to the other. Is it necessary? No - just use the value you need to compare to as your threshold in your automation without conversion.
Thanks for your reply. My takeaway: I could not wrap my head around the sensors that are coming from the OpenWeatherMap integration. Also, it is coded for the deprecated API v3 instead of the new v4.
I connected directly to the OneCall v4 API through the REST integration. Now the values I get are matching the OpenWeatherMap documentation. That makes it a lot easier to make sense of sensor values.