Wunderground Weather and Home Assistant

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?

root

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:
https://community.home-assistant.io/t/wunderground-not-working/202379/17?u=heinz

1 Like

Hello
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?

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 }}’
    From secrets.yaml
    wunderground_url: https://api.weather.com/v2/pws/observations/current?stationId=stationID&format=json&units=e&apiKey=apiKey

From my browser:

observations
0
stationID XXXXXX
obsTimeUtc 2021-04-28T11:52:27Z
obsTimeLocal 2021-04-28 07:52:27
neighborhood XXXXXXX
softwareType myAcuRite
country XX
solarRadiation null
lon XXXXXXX
realtimeFrequency null
epoch 1619610747
lat XXXXXXX
uv 1
winddir 236
humidity 100
qcStatus 1
imperial
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
  monitored_conditions:
    - 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:


Thoughts?

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.

Hello

I am having exactly the same problem:

image

image

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

Thanks

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?

Sensors

- platform: rest
  name: pws_forecast
  json_attributes:
    - 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
  json_attributes:
    - observations
  value_template: '{{ value_json["observations"][0]["obsTimeLocal"].title() }}'
  resource: !secret wu_report_url
  scan_interval: 00:05:00

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

- platform: template
  sensors:
    pws_report_details: 
      unique_id: "pws_report_values"
      friendly_name: "PWS Report"
      value_template: '{{ states.sensor.pws_report.attributes.observations[0]["stationID"] }}'
      attribute_templates:
        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 }}'

Secrets

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?

Hello
Just saw this now. Sorry for the delay. I’m not sure about pushing the console temperatures to HA. What I did was on the home page of HA I have the ability to log into my weather stations portal (hosted by acurite) and view the current weather from my PWS. Not quite the same as what you are looking for.

What software do you use to display your weather station data on your computer?

Weather Display has built-in mqtt that can be used to send data to home assistant.

Hello
I don’t have specific software to display the weather data. My PWS comes from Acurite and in order to see any data on the computer I need to create an account and login to view my it. In order for this to happen I had to buy a special component that will upload the data to the Acurite. I also have a separate display console in the house. My HA has a web card(?) that logs into my Acurite account and displays the same information as I would see on the computer.