Wunderground not working

Do you need any more assistance to get things going? Then please chime in :slight_smile:

Hi, sorry in jumping into the chat, I’m interested in getting wunderground working with HA, I have a new API, but can’t find the custom component, do you have a link to the details please

I think it is this one: https://github.com/cytech/Home-Assistant-wundergroundpws

Thanks I’ll check it out in the morning.

I would love to get an advanced tutorial how to set this up. I´ve got a personal weather station and copying the config from https://github.com/cytech/Home-Assistant-wundergroundpws wouldn´t do the trick for me. If someone got this working, please help me :slight_smile:

Kind regards,
the dude with no hope any more

I just use the rest sensor…
configuration.yaml

sensor:
- 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_location: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].neighborhood }}'
      friendly_name: Location
    pws_station_id: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].stationID }}'
      friendly_name: Staion ID
    pws_type: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].softwareType }}'
      friendly_name: Station Type
    pws_wind_dir: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].winddir }}'
      friendly_name: Wind Direction
      unit_of_measurement: "°"
    pws_wind_gust: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].windGust }}'  
      friendly_name:  Wind Gust  
    pws_wind_speed: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].imperial.windSpeed }}'
      friendly_name: Wind Speed
      unit_of_measurement: "MPH"
    pws_humidity: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].humidity }}'
      friendly_name: Humidity
      unit_of_measurement: "%"
    pws_precip_total: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].imperial.precipTotal }}'
      friendly_name: Rain Total
      unit_of_measurement: "in"
    pws_precip_rate: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].imperial.precipRate }}'
      friendly_name: Rain Rate
      unit_of_measurement: "in"
    pws_temp: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].imperial.temp }}'
      friendly_name: Temp
      unit_of_measurement: "°F"
    pws_solar: 
      value_template: '{{ states.sensor.pws_report.attributes.observations[0].solarRadiation }}'

secrets.yaml

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

Could you please explain me a little bit more detailed how to implement this? Would be very thankful :slight_smile:

1.) Put the URL in secrets.yaml, replacing <APIKEY> and <STATIONID> with your values
2.) Put the rest in configuration.yaml under sensor
3.) Save, Check Config, Restart HA

1 Like

Thanks wuench! This worked for me. I tried using the custom wunderground above, and configuration wouldn’t check or restart, even at barebones configuration. This seems like it will work like a charm.

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