Open MHerbst opened 5 years ago
Makes sense. But it would be nice to have a confirmation from OWM support for such a behavior. Most answers in the FAQ sounds different. Let's open a ticket over there and hand over your results/data to them.
Maybe they try to keep the amount of data in JSON as small as possible. But you are right, an "official" statement would be good.
I posted a message at OWM Support Center: https://openweathermap.desk.com/customer/en/portal/questions/17476619-wind-not-degre-
@MHerbst I got an answer for my question from the OpenWeatherMap Agent. It looks like our assumption was wrong and the JSON is correct. Thus we do not need any changes / workarounds in the binding.
Pavel Zuykov Jan 09, 2019 08:49AM GMT OpenWeatherMap Agent
Hello Christoph,
Thank you for report.
I checked this, and seems like XML output gives zero then there is no data about direction.
We will add this fix to our list of improvements.
If the wind direction is north the angle is 0 and the return JSON file does not contain a value for direction. In this case the binding sets the value to UNDEF:
It would be more user-friendly if the binding would set the channel state to 0°.
This is the JSON buffer returned by owm of :
There is a value for wind:speed but no value for direction.
If you request the data in XML format, it looks like this:
Here you can see that the value is "0" because the wind direction is "North".
Maybe there are other entries that are missing in the return JSON file if they are "0". In this case the binding should use appropriate default values and not "UNDEF".