Rudd-O / homeassistant-meteoswiss

:sun_behind_rain_cloud: :switzerland: Meteo Swiss Integration for Home Assistant (forked from websylv)
86 stars 10 forks source link

Entities unavailable #3

Closed aschbertus closed 1 year ago

aschbertus commented 1 year ago

Hello @Rudd-O

First of all, thanks a bunch for taking this over and making it future proof.

After the previous version from websylv failed at the integration state, I removed this repository from HACS and added your repository according to the install manual.

Everything seemed to work fine, however, when I looked at the entities the all seem to be unavailable: Entities_Unavailable

I find it interesting tough, that when I look at the forecast card (modified to pull data from the new meteoswiss entity), it properly displays the forecast but not all current values (most notably temperature and humidity). Forecast_Card

A added the log for your reference. It seems that the forecast as well as the current data was pulled correctly (according to the log). home-assistant.log

Let me know if I can perform any tests. Please know, that I am pretty new to HA at this point, but I am more than happy to help. Thanks in advance for looking into this.

Have a good one,

Aschbertus

Rudd-O commented 1 year ago

Looks to me like these old entities were provided by the old Meteo Swiss integration. Please remove them manually then restart HASS and see how it goes.

aschbertus commented 1 year ago

Thanks for your reply. Appreciated!

As I was unable to remove the unavailable entities ("You can only remove 0 of the selected 1 entities. Entities can only be removed when the integration is no longer providing the entities...."), i went through and removed the integration and the downloaded repo all-together and started from scratch.

Same thing happened, with one curious difference. After the first launch only 12 entities appeared, the "Temperature"-Entity was missing. It appeared after a while (maybe 5 minutes) but was also marked as "unavailable".

Before downloading the repo I made sure that the previous repo was properly deleted in /config/custom-components/ and it was gone.

Am I missing some old, hidden elements? Or do I have to take another route to delete the entities?

Sidenote: obviously I restarted HA after all actions (i.e. removing, downloading, integrating, ...)

Thanks for helping!

Rudd-O commented 1 year ago

2023-02-11 01:09:44.625 WARNING (MainThread) [custom_components.meteo-swiss] Station BEP provided us with no real-time data

That's strange. That's why your entities are showing up as absent. See the condition: [] being empty? That means no real-time data is being provided by station BEP. I would need your config to try and reproduce this locally.

Rudd-O commented 1 year ago

I reproduced. Yep, no data. Strange. Let me figure out what up.

Rudd-O commented 1 year ago

You will eventually (2-3 hours) be told that there is a repair because your station does not produce real-time data. That's the only thing we can do right about now.

Rudd-O commented 1 year ago

According to https://data.geo.admin.ch/ch.meteoschweiz.messwerte-aktuell/VQHA80.csv BEP does not provide any real-time station data. I think I need to add a check when the station is selected. Let me open a bug tracker issue about that.

Rudd-O commented 1 year ago

https://github.com/Rudd-O/homeassistant-meteoswiss/issues/4 What do you think of this? Would this work for you?

aschbertus commented 1 year ago

Hello @Rudd-O ,

You are a beast! Thanks for putting the effort and checking all of this. Makes a lot of sense to me. It is a pity tough, as this means no real-time data for me, at least not from meteo-swiss. In any case, I guess your proposed fix in #4 is a viable way to at least not have people run into the issue.

In the meantime however: am I right to assume that I could remove the current integration and add a new one (or add a second one for that matter), referring to another weather station that provides real-time data. Obviously I'd have to accept, that the data may not be perfectly accurate. Honestly, it anyway would not have been, as the selected one is supposedly the closest, but it is not actually very close either.

Rudd-O commented 1 year ago

In the meantime however: am I right to assume that I could remove the current integration and add a new one (or add a second one for that matter), referring to another weather station that provides real-time data. Obviously I'd have to accept, that the data may not be perfectly accurate. Honestly, it anyway would not have been, as the selected one is supposedly the closest, but it is not actually very close either.

Yes. After upgrading to the latest version I just published in this repo, delete the current one, and then re-add it. The real-time weather station closest to you (excluding all the precipitation stations) will be preselected as default in the configuration flow form.

In the future I will make selecting this station optional.