Weather underground (Wunderground) weather sensor

Credit goes to @kellbot who laid out the initial ground work here. I updated the sensor so that the values update and cleaned up the code.

Here’s the github link -

You can use this along with the sensor templates and customization provided by @rpitera below.

1 Like

There are three files here:

  1. sensor_templates.yaml - all of the templated sensors for the shared, imperial and metric measurements. This goes in your sensors section; number it appropriately if you don’t use a separate sensors.yaml file and are adding it to your configuration.yaml
  2. group_config.yaml - all of the named sensors in one group. Same rules as above.
  3. customizations.yaml - all of the friendly names and icons. Same rules as above.

Enjoy - this is my way of giving back to the group. Let me know if you have any issues; my suggestion would be to back up ALL your YAML files before doing this and be very careful about editing! If you end up with a bunch of badge sensors on your front page, you probably missed a space or something. It happened to me more than once laying this all out.

sensor_templates.yaml (4.3 KB)
group_config.yaml (1.1 KB)
customizations.yaml (3.0 KB)


Thanks @rpitera I have updated the original post :slight_smile:

My thanks to you and @kellbot. I love my WeatherUndeground!

awesome! any chance you could submit that to the original repo as a pull request? I probably won’t have a chance to update it until after this weekend (2 jobs and 2 kids leads little time for much else lately).

Kell, feel free to include my YAML files in your distribution.

Will do next time I get a chance to sit down at a real computer, thanks!

In the example config, the UV in states.sensor.weather_underground_pws.attributes.UV needs to be in caps, as that is how the API returns it

I fixed that in the original thread but forgot about it here.

@rpitera @arsaboo Nice!!! Are you going to request an official PR?

There are still a few this pending before I can create a PR, but am working on it.


Line 33 of needed to be changed on Raspberry Pi to self._unit_of_measurement = TEMP_FAHRENHEIT from self._unit_of_measurement = “°F” because of ‘utf-8’ codec error. TEMP_FAHRENHEIT is defined in the homeassistant package in and also needs to be added after line 7: from homeassistant.const import TEMP_FAHRENHEIT

For those newbies like me, I included the following in my configuration.yaml file:

  1. At the end of the homeassistant: section, I added ’ customize: !include customize.yaml’. Note the two spaces in front of the line.

  2. I added wunderground as my first sensor (note there are two spaces in front of everything after sensor below
    platform: wunderground
    api_key: YOURKEY
    pws_id: KMANORTH112

  3. I added the sensor templates file as my next sensor:
    sensor 2: !include sensor_templates.yaml

  4. Towards the end of my configuration.yaml file, I added the group line:
    group: !include group_config.yaml

1 Like

Install instructions same for Pi all-in-one installer?

For Pi AIO you save to custom_components/sensor or deps folder?

I’m having a hard time getting this sensor up and running. Did everything macaroni1975 posted when I restart HA doesn’t start no log output either.

Correct. I’m on AIO as well.

Can somone with a working wundergroud setup share their .yaml files? I must be grouping or customizing something wrong.

Before you try customizing/grouping, just make sure that you are getting those sensors created with the right data (start simple). What error are you getting?

Take a look here:

I provided all the YAML files as well as screenshots.

thanks… i actually figured it out last night. was struggling with it for a few days… I used wget to grab py file so opening it revealed html code. used git to grab py file everything is working now.

1 Like

Good to hear!

Just created a PR for the Wunderground sensor