home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Cloud coverage in OpenWeatherMap integration is inversed #119873

Open frontendphil opened 2 months ago

frontendphil commented 2 months ago

The problem

When there are no clouds, the coverage shows 100%, and when the sky is full of them, it shows 0%. I've tracked this over a day with changing conditions, and the coverage went up as the clouds went away. So, my gut feeling is there needs to be a 1 - x somewhere :)

What version of Home Assistant Core has the issue?

2024.6.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

OpenWeatherMap

Link to integration documentation on our website

https://www.home-assistant.io/integrations/openweathermap

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @fabaff, @freekode, @nzapponi, mind taking a look at this issue as it has been labeled with an integration (openweathermap) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `openweathermap` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign openweathermap` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


openweathermap documentation openweathermap source (message by IssueLinks)

gNeeUs commented 2 months ago

I am glad I found this issue listed here. I cannot confirm that it is Inversed, although that might just well be the case. For several weeks I have been seeing unusually low percentages in the single digits of Cloud coverage whereas the real situation in my area has been very cloudy. I'm waiting for a non-cloudy day to confirm if it might indeed go the other way. I have an automation dependent on it which turns on the electricity on the solar powered Hot Water heater, and during extremely cloudy days from the last few weeks that has obviously failed. I have verified everything I could and I find nothing in the error logs, all entities are active, the automation has not changed, and all other functions such as temperatures and forecast seem to be working as expected. Another possible cause of the issue may be related to the weather codes as described on https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2. In the attached picture I'm showing the history of my weather codes which almost never include a code 804 for the highest level of cloudiness, whereas I would expect many of those for the recent days/weeks. I too would appreciate someone looking into this, with many thanks in advance! 2024-07-07_19h41_29

freekode commented 2 months ago

What cloud coverage history you have for these weather codes? My values atm: code 801, coverage 17, which is correlates. So far I can't confirm that the value should be inverted, although it could be OWM location based issue.

strauss115 commented 2 months ago

I also experienced wrong data with OWM, especially with cloud cover, lately. However, looking at the raw data it just looks like that OWM provides wrong information for my location. It definitely was more reliable in the past.

gNeeUs commented 1 month ago

So far I must conclude that the culprit is source data from OWM. I have compared the data in HA with the area weather stations from https://openweathermap.org/weathermap and it corresponds. I live in a small area with a very variable microclimate and conditions are hugely different between small distances. I suspect (I can't substantiate, but it's an educated guess) there are very few weather stations here, and when those are transmitting erroneous data, there may be no other data from area weather stations to consolidate with. Perhaps OWM provides data for my specific area, obtained from just one faulty weather station. The only other source I can compare with is wunderground.com and it will often show Partly Cloudy conditions (that should mean 26-50% according to https://weather.com/news/weather/news/2023-06-19-weather-words-cloudy-definition) while OWM shows 0%. If anyone knows other reliable sources with fine grain local detail (for Europe please), I'd be happy to look further into this.