Giter Club home page Giter Club logo

Comments (13)

deftdawg avatar deftdawg commented on July 21, 2024 1

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

from env_canada.

michaeldavie avatar michaeldavie commented on July 21, 2024

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.

from env_canada.

alexandery avatar alexandery commented on July 21, 2024

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?

from env_canada.

michaeldavie avatar michaeldavie commented on July 21, 2024

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?

from env_canada.

alexandery avatar alexandery commented on July 21, 2024

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.

from env_canada.

michaeldavie avatar michaeldavie commented on July 21, 2024

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

from env_canada.

deftdawg avatar deftdawg commented on July 21, 2024

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

from env_canada.

michaeldavie avatar michaeldavie commented on July 21, 2024

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.

from env_canada.

michaeldavie avatar michaeldavie commented on July 21, 2024

Fixed!

Screenshot 2019-07-11 23 27 11

from env_canada.

deftdawg avatar deftdawg commented on July 21, 2024

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

from env_canada.

michaeldavie avatar michaeldavie commented on July 21, 2024

Commit: michaeldavie/home-assistant@93f9be3

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

from env_canada.

deftdawg avatar deftdawg commented on July 21, 2024

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.

from env_canada.

michaeldavie avatar michaeldavie commented on July 21, 2024

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.

from env_canada.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.