4 min read

How to Install Weather Underground on Home Assistant and Configure a Simple Dashboard

Home Assistant offers a custom integration specifically for Weather Underground personal weather station users. It includes a native Home Assistant weather entity along with various weather sensors. To set it up, follow these steps, ensuring you have your Weather Underground API key and Station ID.

  1. On your Home Assistant VM create a script to install the weather underground integration:
vi install_wundergroundpws.sh
#!/bin/bash

# Step 1: Create a temporary directory
mkdir -p /tmp/wundergroundpws_install
cd /tmp/wundergroundpws_install

# Step 2: Download the file
wget https://github.com/cytech/Home-Assistant-wundergroundpws/archive/refs/tags/v2.0.9.tar.gz

# Step 3: Extract the tar.gz file
tar -xzf v2.0.9.tar.gz

# Step 4: Move the `wundergroundpws` folder to the target directory
sudo mv Home-Assistant-wundergroundpws-2.0.9/custom_components/wundergroundpws /opt/homeassistant_config/custom_components/

# Step 5: Clean up the temporary directory
cd ~
rm -rf /tmp/wundergroundpws_install

echo "wundergroundpws custom component has been moved to /opt/homeassistant_config/custom_components/"

Note: you will likely need to modify the script to the latest binary and the path to your .homeassistant directory.

  1. Make the script executable:
chmod +x install_wundergroundpws.sh
  1. Run the script which will download the integration and move it to the correct directory:
./install_wundergroundpws.sh
  1. Restart Home Assistant so that it can recognize the new integration.
  2. Once rebooted in Home Assistant navigate to Settings > Devices & Services. Then, tap on Add Integration and search for the wundergroundpws integration.
  1. Install the integration and when prompted enter your Weather Underground API key and your Station ID.
  2. Once configured it's time to create a dashboard to expose the items. Here's a simple stab at creating a view of Todays Weather. Replace YOUR_STATION_ID with yours.
views:
  - title: Weather Station YOUR_STATION_ID
    path: weather
    cards:
      - type: entities
        title: Current Conditions
        entities:
          - entity: sensor.YOUR_STATION_ID_temperature
            name: Temperature
            icon: mdi:thermometer
          - entity: sensor.YOUR_STATION_ID_heat_index
            name: Heat Index
            icon: mdi:thermometer-high
          - entity: sensor.YOUR_STATION_ID_wind_chill
            name: Wind Chill
            icon: mdi:thermometer-low
          - entity: sensor.YOUR_STATION_ID_dewpoint
            name: Dew Point
            icon: mdi:water-percent
          - entity: sensor.YOUR_STATION_ID_relative_humidity
            name: Humidity
            icon: mdi:water-percent
      - type: weather-forecast
        entity: weather.YOUR_STATION_ID
        show_forecast: true
      - type: entities
        title: Precipitation
        entities:
          - entity: sensor.YOUR_STATION_ID_precipitation_rate
            name: Current Rate
            icon: mdi:weather-pouring
          - entity: sensor.YOUR_STATION_ID_precipitation_today
            name: Today's Total
            icon: mdi:weather-rainy
      - type: glance
        title: Wind Conditions
        entities:
          - entity: sensor.YOUR_STATION_ID_wind_speed
            name: Wind Speed
            icon: mdi:weather-windy
          - entity: sensor.YOUR_STATION_ID_wind_gust
            name: Wind Gust
            icon: mdi:weather-windy-variant
          - entity: sensor.YOUR_STATION_ID_wind_direction_cardinal
            name: Direction
            icon: mdi:compass
          - entity: sensor.YOUR_STATION_ID_wind_direction_degrees
            name: Degrees
            icon: mdi:compass-outline
      - type: history-graph
        title: Temperature History
        hours_to_show: 24
        entities:
          - entity: sensor.YOUR_STATION_ID_temperature
            name: Temperature
          - entity: sensor.YOUR_STATION_ID_heat_index
            name: Heat Index
          - entity: sensor.YOUR_STATION_ID_wind_chill
            name: Wind Chill
      - type: history-graph
        title: Wind History
        hours_to_show: 24
        entities:
          - entity: sensor.YOUR_STATION_ID_wind_speed
            name: Wind Speed
          - entity: sensor.YOUR_STATION_ID_wind_gust
            name: Wind Gust
      - type: entities
        title: Station Information
        entities:
          - entity: sensor.YOUR_STATION_ID_pressure
            name: Barometric Pressure
            icon: mdi:gauge
          - entity: sensor.YOUR_STATION_ID_elevation
            name: Elevation
            icon: mdi:elevation-rise
          - entity: sensor.YOUR_STATION_ID_station_id
            name: Station ID
            icon: mdi:weather-cloudy
          - entity: sensor.YOUR_STATION_ID_neighborhood
            name: Location
            icon: mdi:map-marker
          - entity: sensor.YOUR_STATION_ID_local_observation_time
            name: Last Updated
            icon: mdi:clock-outline
      - type: glance
        title: Solar Conditions
        entities:
          - entity: sensor.YOUR_STATION_ID_solar_radiation
            name: Solar Radiation
            icon: mdi:sun-wireless
          - entity: sensor.YOUR_STATION_ID_uv_index
            name: UV Index
            icon: mdi:sun-clock

The above dashboard will look something like this:

  1. I decided to enable weather forecasts which is an option in the integration. Here's a simple dashboard focused on exposing those attributes. Replace YOUR_STATION_ID with yours.
views:
  - title: Weather Forecast
    path: weather
    cards:
      - type: entities
        title: Tonight's Forecast
        entities:
          - entity: sensor.YOUR_STATION_ID_weather_summary_0
            name: Forecast
            icon: mdi:weather-night
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_1n
            name: Precipitation Chance
            icon: mdi:weather-rainy
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_1n
            name: Precipitation Amount
            icon: mdi:water
          - entity: sensor.YOUR_STATION_ID_snow_amount_0
            name: Snow Amount
            icon: mdi:snowflake
      - type: entities
        title: Tomorrow's Forecast
        entities:
          - entity: sensor.YOUR_STATION_ID_weather_summary_1
            name: Forecast
            icon: mdi:weather-sunny
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_2d
            name: Precipitation Chance
            icon: mdi:weather-rainy
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_2d
            name: Precipitation Amount
            icon: mdi:water
          - entity: sensor.YOUR_STATION_ID_snow_amount_1
            name: Snow Amount
            icon: mdi:snowflake
      - type: entities
        title: Tomorrow Night's Forecast
        entities:
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_3n
            name: Precipitation Chance
            icon: mdi:weather-rainy
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_3n
            name: Precipitation Amount
            icon: mdi:water
      - type: entities
        title: Extended Forecast - Nights
        entities:
          - type: section
            label: Friday Night
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_5n
            name: Precipitation Chance
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_5n
            name: Precipitation Amount
          - type: section
            label: Saturday Night
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_7n
            name: Precipitation Chance
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_7n
            name: Precipitation Amount
          - type: section
            label: Sunday Night
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_9n
            name: Precipitation Chance
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_9n
            name: Precipitation Amount
      - type: entities
        title: Extended Forecast - Days
        entities:
          - type: section
            label: Friday
          - entity: sensor.YOUR_STATION_ID_weather_summary_2
            name: Forecast
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_4d
            name: Precipitation Chance
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_4d
            name: Precipitation Amount
          - type: section
            label: Saturday
          - entity: sensor.YOUR_STATION_ID_weather_summary_3
            name: Forecast
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_6d
            name: Precipitation Chance
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_6d
            name: Precipitation Amount
          - type: section
            label: Sunday
          - entity: sensor.YOUR_STATION_ID_weather_summary_4
            name: Forecast
          - entity: sensor.YOUR_STATION_ID_precipitation_probability_8d
            name: Precipitation Chance
          - entity: sensor.YOUR_STATION_ID_precipitation_amount_8d
            name: Precipitation Amount
    type: masonry

The above dashboard will look something like this: