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
70.93k stars 29.58k forks source link

Buienradar: Discrepancy in precipitation forecast #121837

Closed freddieleeman closed 1 month ago

freddieleeman commented 1 month ago

The problem

I've observed a significant discrepancy between the precipitation forecast on the website and within Home Assistant. I rely on this data to decide whether to activate the irrigation pump. Yesterday, the pump started because the forecast in Home Assistant showed only 3 mm of precipitation, while the Buienradar website indicated 18 mm. Now, on Friday, although the forecast in Home Assistant has increased, it is still significantly different from the website's values. I've confirmed that the latitude and longitude settings are accurate and identical in both sources.

Today is Friday. The current maximum precipitation value in Home Assistant is 10 mm, whereas the Buienradar website predicts nearly 20 mm. As seen in the latest screenshots, there is also a small discrepancy in the temperature forecast.

image

image

image

What version of Home Assistant Core has the issue?

core-2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

buienradar

Link to integration documentation on our website

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

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 1 month ago

Hey there @mjj4791, @ties, @robbie1221, mind taking a look at this issue as it has been labeled with an integration (buienradar) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `buienradar` 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 buienradar` 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)


buienradar documentation buienradar source (message by IssueLinks)

jwdeboer commented 1 month ago

+1 same situation here

rrooggiieerr commented 1 month ago

Do you have the Minutes to look ahead for precipitation forecast configured correctly?

Screenshot 2024-07-12 at 09 05 54
freddieleeman commented 1 month ago

Does that affect the sensor.buienradar_(minimum_|maximum_|)rain_[1-5] entities? If so, to what value should I adjust to find out the expected precipitation in mm for the rest of today and the upcoming days?

rrooggiieerr commented 1 month ago

Not entirely sure actually, I just remembered I saw some setting that involved precipitation forecast. Thinking about it I guess a day forecast involves 24 hours.

Isn't the rain_1d forecast for tomorrow and rain_2d for the day after tomorrow?

freddieleeman commented 1 month ago

No, the XML returns a 5-day forecast starting from today.

https://data.buienradar.nl/2.0/feed/json

image

The values within Home Assistant match the default XML data. Could it be that the five-day forecast isn't specific to the configured latitude and longitude?

freddieleeman commented 1 month ago

EDIT: This might have been a fluke/coincidence, as the values changed and are now the same even without the lat/lon.

Including the latitude and longitude in the URL works and displays the correct values:

image

From what I've observed so far, it seems that the latitude and longitude are not being correctly added to the query, leading to inaccurate values.

rrooggiieerr commented 1 month ago

Which version of HA are you using? There recently changed something in how forecasts work and on 2024.07 I can't reproduce your sensor.buienradar_rain_* sensors. I think forecasts should now be requested using:

service: weather.get_forecasts
target:
  entity_id: weather.buienradar
data:
  type: daily

Sorry, found the entities

rrooggiieerr commented 1 month ago

From what I've observed so far, it seems that the latitude and longitude are not being correctly added to the query, leading to inaccurate values.

That would explain a lot

mjj4791 commented 1 month ago

Precipitation forecast is calculated from the gps coordinates based precipitation data from buienradar; see here: https://www.buienradar.nl/overbuienradar/gratis-weerdata Under Neerslagdata op basis van coördinaten If I remember correctly, the calculation uses the lookahead period configured in the buienradar component and uses the mm data to determine the total amount of mm in the period you specified and then average that to an amount per hourHope this clarifies it? not sure which data you refer to / compare with and if these values are available from the public api?Op 12 jul 2024 om 09:31 heeft rrooggiieerr @.***> het volgende geschreven: Not entirely sure actually, I just remembered I saw some setting that involved precipitation forecast. Thinking about it I guess a day forecast involves 24 hours. Isn't the rain_1d forecast for tomorrow and rain_2d for the day after tomorrow?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

freddieleeman commented 1 month ago

I'm referring to the fivedayforecast sensors for minimum and maximum values. I believe these values are not calculated, but directly taken from the JSON.

mjj4791 commented 1 month ago

@home-assistant close