Wunderground Weather and Home Assistant


I’m a Linux and HA newbie and I’m trying to add my personal weather station to HA. I’m using this document as my instructions.

The issue I’m having is I can’t locate the “custom_components” or .“homeassistant” directories refereed to below:

“To Install, copy the custom_components directory into your .homeassistant directory and the www directory into your .homeassistant directory.


copy the contents of the custom_components into an existing custom_components directory in your .homeassistant directory and the contents of the www directory into an existing www directory in your .homeassistant directory.”

1.) I have HA running on a Rasberry Pi 4 running Alpine Linux version 3.13. Even though I have an SD card installed, I don’t believe there’s anything on it (how can I check)?
2.) I do have a PSW and it’s registered with wunderground and I am able to get the API key.
3.) Are the instructions still valid for setting up a PSW within HA?
Thanks in advance for any help that can be provided.

Well, depends on the type of installation you are using - Docker or Supervised?
I can’t say for Docker, but I’m using Supervised and the mentioned directory is in “/usr/share/hassio/homeassistant”.

Thanks for the response.
It’s not in the “usr/share/…” directory as it doesn’t seem to exist. I don’t recall how I installed it on the Pi.

I would say most likely you are using Container or Core installation then. Afaik, in this case you can not use addons - see this table as reference.
You could still try the native integration though… however, I tried it but it didn’t work for me because of some changes in the API, so I ended up using the 3rd party (cytech) addon also.

I’ve found these directories and files. Is it possibly in one of these?


You need to check and see if WU is still giving out API keys. After IBM purchased WU, the program was cut back considerably.

What software do you use for your weather station. There may be different options to get the data you need. For instance, I use Weather Display and by using the built-in mqtt I am able to grab all the data I want. As I understand it, Ambience misspelled has a way through a bridge to do the same thing.

Lots of options out there.

Seems like it could be the correct one… costs you nothing to try adding the directories, files and configs :).

Admiral Stripe - Thanks for your response. I’ll look into the directories further.

Edwin - Thanks for your response. I have an account with wunderground so I’m able to get an API key for for my weather station. This information is posted to wunderground and acurite.com. Apparently I should have the ability to pull info from wunderground and display it on HA (because I can obtain the API key). Other wise, as I understand it, I need to use a dongle and sniff out the data being transferred from the weather station to my weather station display unit.

I added the sensors of my PWS as explained here:

1 Like

I looked at the link that Heinz provided and have added the following code. Please see below. It adds the sensors to HA but doesn’t populate them with any information. The url in “secrets” works in a browser so I know I’ve got the correct station ID and API key. Any ideas as to what maybe failing?


  • platform: rest
    name: pws_report

    • observations
      value_template: ‘{{ value_json[“observations”][0][“obsTimeLocal”].title() }}’
      resource: !secret wunderground_url

    scan_interval: 300

  • platform: template
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].neighborhood }}’
    friendly_name: Location
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].stationID }}’
    friendly_name: Staion ID
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].softwareType }}’
    friendly_name: Station Type
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].winddir }}’
    friendly_name: Wind Direction
    unit_of_measurement: “°”
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].windGust }}’
    friendly_name: Wind Gust
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].imperial.windSpeed }}’
    friendly_name: Wind Speed
    unit_of_measurement: “MPH”
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].humidity }}’
    friendly_name: Humidity
    unit_of_measurement: “%”
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].imperial.precipTotal }}’
    friendly_name: Rain Total
    unit_of_measurement: “in”
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].imperial.precipRate }}’
    friendly_name: Rain Rate
    unit_of_measurement: “in”
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].imperial.temp }}’
    friendly_name: Temp
    unit_of_measurement: “°F”
    value_template: ‘{{ states.sensor.pws_report.attributes.observations[0].solarRadiation }}’
    From secrets.yaml
    wunderground_url: https://api.weather.com/v2/pws/observations/current?stationId=stationID&format=json&units=e&apiKey=apiKey

From my browser:

stationID XXXXXX
obsTimeUtc 2021-04-28T11:52:27Z
obsTimeLocal 2021-04-28 07:52:27
neighborhood XXXXXXX
softwareType myAcuRite
country XX
solarRadiation null
realtimeFrequency null
epoch 1619610747
uv 1
winddir 236
humidity 100
qcStatus 1
temp 45
heatIndex 45
dewpt 45
windChill 45
windSpeed 0
windGust 0
pressure 29.06
precipRate 0
precipTotal 0.02
elev 791

Quick update. I now seems to be working.

Hi all,

I’m struggling to get this to work with WUnderground. I know that my WU configuration is correct because I can find my station on WU. However, I get this error when checking the config.

I couldn’t put the the code into the config file described in the instructions because I have a separate sensors.yaml file. So I put the code in there.

- platform: wundergroundpws
  api_key: !secret wu_api_key
  pws_id: !secret wu_station_id
  numeric_precision: none
    - solarRadiation
    - neighborhood
    - obsTimeLocal
    - uv
    - winddir
    - humidity
    - dewpt
    - heatIndex
    - windChill
    - elev
    - precipTotal
    - precipRate
    - pressure
    - temp
    - windGust
    - windSpeed
    - precip_1d
    - precip_chance_1d
    - temp_high_1d
    - temp_low_1d
    - wind_1d
    - weather_1d
    - weather_1n

This is my folder structure for the WU code and icons:


I resorted to using the RESTful sensor and it is working very well.

Not sure, but if you just copied the files to custom_components (or installed wundergroundpws via HACS), it would be good to restart HA and then try to add the code to sensors.yaml, otherwise HA may not recognize the addon as installed and therefore giving you error “integration not found”.
The code itself seems correct to me, at least I have the same one in my sensors.yaml.


I am having exactly the same problem:



I already deleted/re-added the files few times, any other ideas?


Did you restart Home Assistant? It wont know about the custom_components directory or any of the components in it until it’s been restarted.

hm I did few times before posting. However today it started working so we’re good :slight_smile:

1 Like

I’ve never used the restful sensor. I have a PWS connected to WU. Do you mind sharing how you did it?


- platform: rest
  name: pws_forecast
    - calendarDayTemperatureMax
    - calendarDayTemperatureMin
    - dayOfWeek
    - expirationTimeUtc
    - moonPhase
    - moonPhaseCode
    - moonPhaseDay
    - moonriseTimeLocal
    - moonriseTimeUtc
    - moonsetTimeLocal
    - moonsetTimeUtc
    - narrative
    - qpf
    - qpfSnow
    - sunriseTimeLocal
    - sunriseTimeUtc
    - sunsetTimeLocal
    - sunsetTimeUtc
    - temperatureMax
    - temperatureMin
    - validTimeLocal
    - validTimeUtc
    - daypart
  value_template: '{{ value_json["validTimeLocal"][0] }}'
  resource: !secret wu_forecast_url
  scan_interval: 03:00:00

- platform: rest
  name: pws_report
    - observations
  value_template: '{{ value_json["observations"][0]["obsTimeLocal"].title() }}'
  resource: !secret wu_report_url
  scan_interval: 00:05:00

- platform: rest
  name: pws_history
    - summaries
  value_template: '{{ value_json["summaries"][0]["obsTimeLocal"].title() }}'
  resource: !secret wu_history_url
  scan_interval: 24:00:00

- platform: template
      unique_id: "pws_report_values"
      friendly_name: "PWS Report"
      value_template: '{{ states.sensor.pws_report.attributes.observations[0]["stationID"] }}'
        obs_time: '{{ states.sensor.pws_report.attributes.observations[0].obsTimeLocal }}'
        wind_dir: '{{ states.sensor.pws_report.attributes.observations[0].winddir }}'
        humidity: '{{ states.sensor.pws_report.attributes.observations[0].humidity }}'
        temperature: '{{ states.sensor.pws_report.attributes.observations[0].metric.temp }}'
        heat_index: '{{ states.sensor.pws_report.attributes.observations[0].metric.heatIndex }}'
        dewpt: '{{ states.sensor.pws_report.attributes.observations[0].metric.dewpt }}'
        windchill: '{{ states.sensor.pws_report.attributes.observations[0].metric.windChill }}'
        wind_speed: '{{ states.sensor.pws_report.attributes.observations[0].metric.windSpeed }}'
        wind_gust: '{{ states.sensor.pws_report.attributes.observations[0].metric.windGust }}'  
        pressure: '{{ states.sensor.pws_report.attributes.observations[0].metric.pressure }}'
        precip_rate: '{{ states.sensor.pws_report.attributes.observations[0].metric.precipRate }}'
        precip_total: '{{ states.sensor.pws_report.attributes.observations[0].metric.precipTotal }}'


wu_report_url: https://api.weather.com/v2/pws/observations/current?stationId=<MyStationdID>&format=json&units=m&apiKey=<MyAPIKey>&numericPrecision=decimal

wu_forecast_url: https://api.weather.com/v3/wx/forecast/daily/5day?geocode=<MyLatLon>&format=json&units=m&language=en-US&apiKey=<MyAPIKey>

wu_history_url: https://api.weather.com/v2/pws/dailysummary/7day?stationId=<MyStationID>&format=json&units=m&apiKey=<MyAPIKey>&numericPrecision=decimal

1 Like

I use the wundergroundpws integration, it has been working well for ages. I use a Davis VP2 PWS, which has a few sensors, including temperature and humidity, in its console. Is it possible to push the console temperature to HA and if so, what is the sensor name that I would need to add to my config file?