Core: Yr component platform is reaching end-of-life

Created on 14 Apr 2020  路  12Comments  路  Source: home-assistant/core

The problem

Hi, this is from the Norwegian Meteorological Institute. I notice that you both have a "met" and an "yr" component in the core. These actually come to the same data source (api.met.no), but the Yr API has a reformatted subset of the data (tailored for the old version of yr.no) as well as using place names instead of geocoordinates for the interface.

The old yr.no pages are being deprecated, and the Yr API along with it. The current plan is to terminate both early 2021. Because of this I suggest you deprecate the "yr" platform component ASAP and instruct users to use the "met" component instead.

We would also like to notify you about our new 2.0 JSON version of Locationforecast, which is both faster and more accurate than the old 1.9 XML version (we also have an XML version in 2.0 for backwards compatibility). Version 2.0 is currently in late beta, but we expect to release it soon once the documentation is ready. At the same time 1.9 will be deprecated, probably to go away at the same time as the Yr API. We suggest you update the "met" component to use version 2.0 before the end of the year.

Environment

  • Home Assistant Core release with the issue:
  • Last working Home Assistant Core release (if known):
  • Operating environment (Home Assistant/Supervised/Docker/venv):
  • Integration causing this issue: yr
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/yr/

Problem-relevant configuration.yaml

(not relevant)

Traceback/Error logs

(not relevant)

Additional information

Documentation

yr

Most helpful comment

Interesting. If you want access to sensor observations, we have a separate API for that.

We also have other data sources which might be of interest to HomeAssistant users, like gale warnings, tidal water levels, radar images and the very accurate 15-minute precipitation forecast called nowcast.

All 12 comments

Hey there @danielhiversen, mind taking a look at this issue as its been labeled with a integration (yr) you are listed as a codeowner for? Thanks!

So, looking at the source code right after posting the issue, I notice that the "yr" component is not using the yr.no API after all, but goes to the same source as the "met" component. This means the problem is not as large as first predicted, but you will still need to make some (minor or major) adjustments by the end of the year.

The minimum required changes are:

  • switch to using version 2.0 XML. This is quite similar except for more time intervals.

The suggested changes are:

  • switch to using version 2.0 JSON, which has more data and is the recommended format
  • switch to using version 2.0 of the weather icons (if you use them in HomeAssistant)
  • consider merging the "yr" and "met" components so that you'll only have one codebase to maintain

In closing, you might like to know that HomeAssistant is currently the number 2 user of api.met.no, trailing far behind yr.no but well above other clients with about 150K req/hour.

Thank you for notifying.
I will upgrade the component to version 2.0 JSON.

Yes, I think we should drop the yr component. See also: https://github.com/home-assistant/core/pull/30115

Interesting. If you want access to sensor observations, we have a separate API for that.

We also have other data sources which might be of interest to HomeAssistant users, like gale warnings, tidal water levels, radar images and the very accurate 15-minute precipitation forecast called nowcast.

I have more time to look at #30115 now, almost forget about it :sweat_smile:

Without sensors for now, as https://github.com/home-assistant/core/pull/30115#issuecomment-574367887 and https://github.com/home-assistant/core/pull/30115#issuecomment-569429492, may add it later on if wanted.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Hi, i am also using the sensor, should i remove it and search for another one, or is there a change of a fix?

Hi, I'm using the forecast sensors of yr.no in order to calculate my garden irrigation. It is important for me, to get the precipitation and wind forecast on hourly basis or at least as total for the upcoming day/next 24 hours.
If you depricate yr.no, please provide precipitation forecasts on met.no.
image

Hi, I'm using the forecast sensors of yr.no in order to calculate my garden irrigation. It is important for me, to get the precipitation and wind forecast on hourly basis or at least as total for the upcoming day/next 24 hours.
If you depricate yr.no, please provide precipitation forecasts on met.no.
image

Not sure if this comment was directed at me or the HomeAssistant developers. I believe the latter now have implemented the necessary changes to the "MET" component so it will completely replace the deprecated "YR" component. If you want to use the met.no API directly, please visit our developer website which has instructions for those coming from the old YR API.

The request was more directed to the HA/ MET.NO Integration developers :-)

The yr platform has been removed in #39247.

Should we close the issue or this also applies to the met integration ?

It doesn't apply to the met integration. The yr integration has been removed.

So indeed, this issue can be closed.

Was this page helpful?
0 / 5 - 0 ratings