Meteo-Swiss integration, fixed and properly working — beware: not the one available by default in HACS!

That works

I will address these issues today! I had not noticed the thread activity because the thread was muted for some reason.

Alright everyone, I’m back.

First of all, a heartfelt apology to every Swiss national who uses the MeteoSwiss integration, for neglecting to attend to the bitrot that is expected over time.

Second, thank you all who contributed to improve the integration with pull requests and issues. Your attention has been useful to everyone.

Third, I woud like to announce the following:

  • The Nominatim OSM issue that many of you raised has been
  1. fixed completely, by adding a unique user agent to the HTTP request;
  2. robustified against unforeseen issues, as any temporary Nominatim error will no longer prevent the integration from being configured, but rather the user will be warned of the situation and asked to enter the postal code and name manually;
  • The integration now supports Rumantsch, Italian and German languages.
    • Please note that my AI’s translation may not be the best, but you are welcome to fix those translations by modifying these files and sending PRs.
  • MeteoSwiss for HA now supports hourly temperature and rain forecasts.
  • You can select an additional precipitation station during setup, so you can see real-time entities from a station that might be closer to you, or immediate real-time rain information that is not available on your selected weather station.
  • Many other defects have been resolved, and code quality has increased by judicious use of Python types.

With that, the major issues that have been raised in the bug tracker have been addressed. You should be able to upgrade to the latest version. If the integration does not appear to be updateable, simply ask HACS to redownload the integration, then restart Home Assistant as usual.

Thanks again for your loyalty and help!

3 Likes

danke dir, es funktioniert wieder.
ein problem das ich noch habe:

Ich möchte einen Rain precipitation sensor erstellen mit dem ich das ausfahren des Sonnenschirms verhindern kann.
Wenn Regen in den nächsten 3 Stunden, dann nicht ausfahren.
Ich probiere das schon seit monaten mit Accuweather, openweather, aber hab es nie hinbekommen trotz diversen Anleitungen.

Kannst du es so erklähren, dass es ein fünfjähriger verstehen würde?
-Service calls, templates

1 Like

Ja gerne aber leider nur in Englisch denn mein Deutsch ist scheiss :slight_smile:

Now that you have your forecast entity (weather.xxxx), you can create a template sensor, which is documented here:

With that sensor (which has an update every 15 minutes per the code), you can obtain the precipitation forecast for this very hour.

Alternatively, if you have added a precipitation station, the precipitation station should give you real-time precipitation in the zone as a sensor already.

2 Likes

And it doesn’t work. Thanks for all the development but just as info for everyone, if you are fresh installing it, it wont work.

Setup successful but integration fails with “Failed setup, will retry: ‘iconDay’”

Its a pity I was so excited when I found it and in the same time so disappointed seeing it broken.

Anyone has idea how to fix it?

I need more logging to fix that particular issue with the icon day problem.

However, I have good news to bring. I have just published an update that fixes the precipitation issue with the precipitation stations. And now you don’t have to select the precipitation station. If your station provides precipitation, as well as any other current condition items, precipitation data will appear. You can continue to have a separate precipitation station configured as well.

The iconDay issue is fixed in the latest update I just pushed. Regrettably, there is no data for certain postcodes in terms of forecasts. So, when the forecast is unavailable, the correct thing to do is to return None to home assistant, which is what the integration is doing as of now. It also raises a repair issue when that situation arises for longer than an hour or so.

1 Like

Thank you for updating the integration! After some weeks without outside temperature and humidity I updated everything with asking HACS to redownload the integration. Now everything works like before.

1 Like

getting again errors:

AttributeError: 'list' object has no attribute 'items'

I’m happy to fix the problem, but if you just post a line and you don’t post a full trace back, there is no way in hell I can ever fix the problem because I just don’t know where the problem can be found.

Please post a traceback (or better a full log).

Thanks for the workup, finally i got it working in my dashboard.
Only thing I’m missing ist information about pollen. Meteo Swiss has a map, but I think that a visualization of the local pollen load instead of a map would be preferable.
Is it possible to integrate this data in your integration?

Please check the issues list on Github for info on the pollen matter. Yes it’d be very nice to have it.

FYI the HACS people added another integration (not as featureful as this one) to default HACS list

I will continue to use and maintain this one, but I have no intention of interacting with the HACS people or supporting that integration.

1 Like

Hello everyone,

Just installed this fork and everything went well.
Two things are not clear to me

Met.no weather card shows the corrext icons, its actual night.
Meteo-swiss is always sunny and it shows three lines of numbers (time,temp,temp) what is the correct temp?

Is this a known bug (icon, to much temps)?

It’s not clear to me why that’s happening. Perhaps because the Swiss metro integration gives you the upper and lower temperatures of a time range. I know that the hourly temperatures do not get the icon because the information is simply not available through the API.

Any chance for the integration of the ICON-CH models now that they are on opendata?

I don’t know how that would be integrated, but a PR is welcomed.

I probably don’t use the right term. I mean get the data in HA.
What does PR mean?

A pull request with improvements on the Github repository of the priject.