Wunderground not working

I try for metric values, but don’t working…
Could you explain?

    pws_precip_total: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.precipTotal }}'
      friendly_name: Rain Total
      unit_of_measurement: "mm"
    pws_precip_rate: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.precipRate }}'
      friendly_name: Rain Rate
      unit_of_measurement: "mm"
    pws_temp: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.temp }}'
      friendly_name: Temp
      unit_of_measurement: "°C"

Are you using units=m in your URL?

wunderground_url: https://api.weather.com/v2/pws/observations/current?stationId=<STATIONID>&format=json&units=m&apiKey=<APIKEY>

…now, yes, I changed.
I restarted HA, but nothing change…! Error still persist. :thinking:
ha_ws_err

I don’t see any issues with what you have. Maybe hit the URL with a browser and see what data you get back.

Hi! I get corect data back from url, but no data in HA. No temp, humidity, wind speed, wind gust, rain rate, rain total…and some values is rouded up in url response (temp, heatIndex, dewpt, winChill, windSpeed, windGust…)

{"observations":[{"stationID":"IBRLAD2","obsTimeUtc":"2020-10-02T12:57:07Z","obsTimeLocal":"2020-10-02 15:57:07","neighborhood":"Gradina publica Barlad","softwareType":"open2300-1.11","country":"RO","solarRadiation":null,"lon":27.673336,"realtimeFrequency":null,"epoch":1601643427,"lat":46.237835,"uv":null,"winddir":203,"humidity":38,"qcStatus":-1,"metric":{"temp":28,"heatIndex":27,"dewpt":12,"windChill":28,"windSpeed":6,"windGust":6,"pressure":990.89,"precipRate":0.00,"precipTotal":0.00,"elev":69}}]}

That looks ok. It seems like maybe HA isn’t sending the correct URL still. If you change one of the sensors back to .imperial. does it pick up that one value? If so that would confirm that theory.

With imperial, everithing is ok…

Hi

Same issue here, Imperial works fine metric says unavailable.
But, sensor.pws.report shows values under metric, and the values looks correct for metric. I.E temp: 8

url changed units=m

/Niclas

Same here. I select imperial but temperature is shown in metric (deg C)…

How do I change from Wind Degree to Direction? IE: Instead of 269 degrees show North or N.

Here is a template someone posted:
https://community.home-assistant.io/t/yet-another-wind-compass-with-wind-speed-indication/144547/13?u=emphyrio

1 Like

This broke because of the split in sensor between the letters and degrees. Thanks for reminding me to update it

God news! Everything is working now! :ok_hand: :loudspeaker: :loudspeaker: :loudspeaker: :drum: :drum: :drum:

This is my call to Wunderground from secrets.yaml:

wunderground_url: https://api.weather.com/v2/pws/observations/current?stationId=XXXX&numericPrecision=decimal&format=json&units=m&apiKey=yourApiKey

(I added “numericPrecision=decimal”, because I ned decimal point precision (eg. 14.7 degC) and changed units to metric (units=m) )

Then i added this in configuration.yaml:

sensor:
#WUNDERGROUND_REST
- platform: rest
  name: pws_report
  json_attributes:
    - observations
  value_template: '{{ value_json["observations"][0]["obsTimeLocal"].title() }}'
  resource: !secret wunderground_url
  scan_interval: 300


- platform: template
  sensors:
    pws_station_id: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].stationID }}'
      friendly_name: Station ID
    pws_obs_local: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].obsTimeLocal }}'
      friendly_name: Time Local
    pws_wind_dir: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].winddir }}'
      friendly_name: Wind Direction
      unit_of_measurement: "°"
    pws_humidity: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].humidity }}'
      friendly_name: Humidity
      unit_of_measurement: "rH%"
    pws_temp: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.temp }}'
      friendly_name: Temperature
      unit_of_measurement: "°C"
    pws_heat_index: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.heatIndex }}'
      friendly_name: Heat Index
      unit_of_measurement: "°C"
    pws_dewpt: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.dewpt }}'
      friendly_name: Dew Point
      unit_of_measurement: "°C"
    pws_windchill: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.windChill }}'
      friendly_name: Wind Chill
      unit_of_measurement: "°C"
    pws_wind_speed:
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.windSpeed }}'
      friendly_name: Wind Speed
      unit_of_measurement: "Km/h"
    pws_wind_gust: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.windGust }}'  
      friendly_name:  Wind Gust
      unit_of_measurement: "Km/h"
    pws_pressure:
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.pressure }}'
      friendly_name: Pressure
      unit_of_measurement: "hPa"
    pws_precip_rate:
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.precipRate }}'
      friendly_name: Rain Rate
      unit_of_measurement: "L/h"
    pws_precip_total:
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].metric.precipTotal }}'
      friendly_name: Rain Total
      unit_of_measurement: "L"

(I stripped, in configuration.yaml, what i don’t need from pws_report )

Hi, i have an Ventus W830 and i am uploading to Ecowitt.net and Weather Underground. My preferred way would be capture data to my pi, and then integrate in HA but, pulling the data from ecowitt or WU is fine by me. What would be the best approach here? Want to have a list of read time readings in ha app.

Regards
Eelco

Yes i could use some assistance since the status of the formal integration is unclear also regarding this document: https://github.com/cytech/Home-Assistant-wundergroundpws

cytech/ Home-Assistant-wundergroundpws

Not working on Dec 27, 2020

The API they are calling is the old one (http://api.wunderground.com/api/…) not the one listed on the API doc (https://api.weather.com/v2/pws/observations/current…)

Also if you are using a RaspberryPi the

conf_file = config.get_default_config_dir() + '/configuration.yaml'

returns the wrong configuration directory.

I hardcoded the correct configuration directory, and was able to get the yaml file to pass configuration check, and the Sensor did appear on the Lovelace dashboard, with errors on each sensor. LOG showed errors on the URL

Testing the URL that was being called in curl (replace {API KEY} with your key to try)

curl -X get "http://api.wunderground.com/api/{API KEY}/alerts/almanac/conditions/forecast/lang:EN/q/pws:ys0w889H.json"

results in

Service Unavailable

New API URL

curl -X get "https://api.weather.com/v2/pws/observations/current?stationId=KVAROUND44&format=json&units=e&apiKey={API KEY}"

returns

{
    "observations": [
        {
            "country": "US",
            "epoch": 1609089409,
            "humidity": 42,
            "imperial": {
                "dewpt": 20,
                "elev": 561,
                "heatIndex": 41,
                "precipRate": 0.0,
                "precipTotal": 0.0,
                "pressure": 30.53,
                "temp": 41,
                "windChill": 41,
                "windGust": 3,
                "windSpeed": 3
            },
            "lat": 39.14,
            "lon": -77.761,
            "neighborhood": "Round Hill",
            "obsTimeLocal": "2020-12-27 12:16:49",
            "obsTimeUtc": "2020-12-27T17:16:49Z",
            "qcStatus": 0,
            "realtimeFrequency": null,
            "softwareType": "vws versionxx",
            "solarRadiation": null,
            "stationID": "KVAROUND44",
            "uv": 0.0,
            "winddir": 112
        }
    ]
}

See my post from 25 nov…

hi, i also habe the w830 - I upload the data directly to HA using this HACS https://github.com/garbled1/homeassistant_ecowitt
In parallel you can upload also to WU or anything else.
The HA_Ecowitt integration works wonderful!

Thanks, indeed the ecowitt integration works great!
It is a bit of work, to change the docker, with hacks and then add the integration, but … i am quite happy with it.

Thank You @paulrafu I did miss it.

  • added the URL to secret (with the API key)
  • in the URL change to be my specifics
    stationid
    apiKey
  • copied the config information into the configuration.yaml
  • combined all sensor: into one definition.

Thank You for pointing me back to the post. I see sensors on the automatic Lovelace page with the readings…

1 Like