Yahoo Weather - pressure

Hi,

Does anyone else show the pressure from yahoo to be somewhat incorrect…

mine shows 34145mb to be this high I would need to live on Jupiter or Saturn :stuck_out_tongue:

My setup is the standard …

platform: yweather
name: My Weather
monitored_conditions:
  - weather
  - weather_current
  - temp_min
  - temp_max
  - wind_speed
  - pressure
  - visibility
  - humidity
  - temperature

Have you tried to check if Yahoo Weather API actually returns the proper value, just to understand if the problem may be there.

Knowing your Woeid, you can check it like this:
curl https://query.yahooapis.com/v1/public/yql -d q="select atmosphere.pressure from weather.forecast where woeid=YOUR_WOEID" -d format=json

In case you don’t know, you can get your woeid while checking the weather in Yahoo Weather website and woeid will correspond to the digits appearing right at the end of your URL.

I haven’t but I did a search and the api returns complete rubbish for the pressure, so I have given up with it and gone over to yr weather for the pressure. Just restarting now to see if I get a decent result :slight_smile:

I’ve found Yahoo Weather to be quite unreliable over time and moved off the platform. I don’t expect it to get much better with Verizon taking over until the merger is complete, either.

I have been using a PWS from Weather Underground and also Yahoo, but I’m curious to know which platform are you using now.

Can you please share?

It’s a shot in the dark, but by any chance do you have any sensors measuring network traffic?

Agreed, I’m satisfied that yr weather works much better and dark sky for that matter :slight_smile:

WeatherUnderground/PWS (because I have my own weather station that’s hooked up to WU) as well as DarkSky.

1 Like

I’ll give DarkSky a try.

1 Like

I have the same issue. Checked the JSON output directly from YSQL and it returns the correct pressure in Pa.

So I guess some conversion must be taking place in the HA Yahoo Weather component or somewhere…

1 Like

If this is the case I would advise reporting an issue on github with your findings.

Sure. Will do.

Submitted issue: https://github.com/home-assistant/home-assistant/issues/8212

2 Likes

As this problem has not yet been resolved, I started using the template below to display the pressure value correctly

pressure_fixed:
  value_template: '{{ "%0.02f" | format(states.sensor.yweather_pressure.state|float * 0.0295300) }}'

Using this because, even with unit_system: imperial in the configuration.yaml file, the component is returning the pressure value in millibars.

1 Like

Just noticed that the values for visibility and wind speed are also wrong.

I’m not a programmer, but reading the component source code I could see that only temperature unit values seems to be converted.

https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/weather/yweather.py

@fabaff is one of the authors of this component, I hope he can help us on fixing the code

pressure_fixed:
  value_template: '{{ "%0.02f" | format(states.sensor.yweather_pressure.state|float * 0.0295300) }}'
visibility_fixed:
  value_template: '{{ "%0.02f" | format(states.sensor.yweather_visibility.state|float * 0.621371) }}'
wind_speed_fixed:
  value_template: '{{ "%d" | format(states.sensor.yweather_wind_speed.state|float * 0.621371) }}'

The issue is that this platform depends on the data which are coming from Yahoo!. And Yahoo! is still delivering the wrong values. Instead of the metric values (mbar) they return inches of mercury but say it’s mb.

https://developer.yahoo.com/yql/console/#h=select+*+from+weather.forecast+where+woeid%3D91543049+and+u%3D’c’