Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Weather" element showing "Condition not observed" in card title #4

Closed
alexandery opened this issue Jul 6, 2019 · 13 comments
Closed

Comments

@alexandery
Copy link

Not sure why that caption is there and what to do to fix that. Don't see any details on that in the docs.

@michaeldavie
Copy link
Owner

michaeldavie commented Jul 6, 2019

Do you know what station you're using? This value is returned if the station hasn't reported a condition, e.g. https://weather.gc.ca/city/pages/nu-24_metric_e.html.

It could be that the default closest station doesn't report full data. You can override the automatic selection using the station configuration parameter with a station ID from this CSV file.

@alexandery
Copy link
Author

I'm using custom defined station as per your instructions. However, does it make sense to remove "Not observed" as that has no value whatsoever? Could be a simple enough rule to filter that out?

@michaeldavie
Copy link
Owner

I suppose I could just set it as null, though I’m not sure what that will show up as in the UI.

If you’re using a station with no observations, are you using the weather component only for the forecast aspect?

@alexandery
Copy link
Author

Weather component for the forecast and Sensor for details of the current conditions.

And no, seems that my station doesn't support "conditions". So, if there is a way to not display that label - that'd be one way to go.

@deftdawg
Copy link

I was about to open a bug for Home Assistant for this very issue... I'll add my comment here instead.

It looks like a lot of stations do not take observations at all... including the one closest to me.

Markham, Ontario (i.e. https://weather.gc.ca/city/pages/on-85_metric_e.html)

My suggestion is if possible, when "Condition not observed" is the data, it might be nicer to use the value from the hourly forecast instead -- i.e. https://weather.gc.ca/forecast/hourly/on-85_metric_e.html

@michaeldavie
Copy link
Owner

That's a great idea, I should be able to work that in without too much trouble. Thanks!

@deftdawg
Copy link

deftdawg commented Jul 12, 2019

Here's the Xpath query to get the first hourlyForecast element:

//hourlyForecastGroup/hourlyForecast[1]

And for the condition we care about:

//hourlyForecastGroup/hourlyForecast[1]/condition

@michaeldavie
Copy link
Owner

Thanks, but it's even easier; the env_canada library already returns a dict with the forecast icon codes and temperatures. I just need to use them if the data is missing.

@michaeldavie
Copy link
Owner

Fixed!

Screenshot 2019-07-11 23 27 11

@deftdawg
Copy link

Eh? Did you push the commit? I don't see it in the repo.

@michaeldavie
Copy link
Owner

michaeldavie commented Jul 12, 2019

Commit: michaeldavie/home-assistant@93f9be3

To be merged as part of this PR: home-assistant/core#24884

@deftdawg
Copy link

I'm not sure this is working quite right.

According to HA, the weather hasn't updated in Markham in 5 days.
image

However, it's quite not rainy atm, not was it during the daytime yesterday...
image

The component itself is working, as I also have a weather condition for Charlottetown which it shows updated to Cloudy 9 hours ago, which matches with the observed conditions there.

Markham (Buttonville) doesn't support observed conditions (always n/a), Charlottetown does.

@michaeldavie
Copy link
Owner

Thanks, I noticed this issue as well. The forecasts weren't being updated correctly, so I've fixed this in 0.0.25. I just opened a PR to merge this change into Home Assistant, and hopefully it'll make it into 0.99.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants