WRAL Weather (Raleigh, NC USA)

Hi All,

Updated February 2024

I have created a custom component for Home Assistant and I wanted to give back a little to the HA community by sharing it.

This custom component provides weather data from WRAL TV which may be of interest to the HA users living in the greater Raleigh, Durham, Cary, Chapel Hill and surrounding areas of North Carolina (USA).

  • The WRAL Weather Custom Integration
    Can be found here along with installation instructions using HACS or for a manual install. It is provides a new platform for the existing HA Weather Component. It uses WRAL Weather REST APIs but these are not published APIs so there may be some bugs due to unknowns showing up in these APIs.
  • Lovelace support:

Enjoy!

2 Likes

added the 2021.3.x required version to the manifest.json file

The first card added after installing Home Assistant. Took me a while to understand things. Thank You

For anyone using this integration, the WRAL weather center web site appears to have changed things today, so at this moment, this integration is currently not working.

EDIT: I have put in a temporary Fix for WRAL website change.
WRAL updated their website to use a new webapi with JSON response which is actually good, but it breaks this integration. In the meantime, they left their legacy URLs around so will use those in the meantime, but it requires an update to this integration which is now available.

Updated to a version that now uses current methods (no longer uses deprecated methods) in HA weather.

Updated w. BREAKING CHANGES

  • Supports the new HA Weather Forecast methods. The [2023.9] release deprecated forecasts as a weather entity attribute and replaced them with new methods. This version now supports the new methods.
    • This also requires any Lovelace cards using this custom Integration to also support the new methods which requires the card to subscribe to weather events.
    • If any template sensors were used to get forecast data from these attributes, these sensors will no longer work.
  • This update “modernizes” this custom integration. It is now to be setup in the UI. If you have this configured in configuration.yaml, you’ll first have to remove this (and reboot HA) before using this update.
  • Adds Hourly forecasts.
  • Adds several sensors that are disabled by default but can be enabled by the user in the UI.

Voice Assistant Intents for WRAL Weather.

HA has a few built-in intents for weather that can be used as is. For example, using a wral weather entity with friendly name “wral” one can say:

  • “What is the weather like”
  • “What is the wral weather like”
  • “What is the weather for wral”

These built-in intent will get the wral weather entity’s state and temperature.

However I wanted to expand on this, and I came up with a few custom intents (which I’m still playing around with):

  • Ask about the current weather and get the current temperature and humidity
  • Ask about today’s weather forecast and get not only the current temperature and humidity but also the day’s forecast from the detailed_description where WRAL provides a lot of textual information.

To get at the forecast data, one has to use the action weather.get_forecasts, so I use a Sentence Trigger to customize the intents:

alias: Weather Sentence Trigger
description: Weather Sentence Trigger
triggers:
  - trigger: conversation
    command:
      - what is [today's|the] weather [forecast] [for today]
      - what is [today's|the] forecast [for today's weather]
    id: weather_today
  - trigger: conversation
    command:
      - what is the current weather
    id: weather_current
conditions: []
actions:
  - action: weather.get_forecasts
    data:
      type: daily
    target:
      entity_id: weather.wral_weather
    response_variable: forecast_data
  - set_conversation_response: >-
      Currently it is {{ states("weather.wral_weather") }} with a temperature 

      of {{state_attr("weather.wral_weather","temperature") }} degrees 

      and humidity of {{state_attr("weather.wral_weather","humidity") }}
      percent.

      {% if trigger.id == 'weather_today' %}  
          The forecast. {% set forecast =
          forecast_data['weather.wral_weather'].forecast[0] %} {{
          forecast['detailed_description'] }}
      {% endif %}
mode: single

Do you know what I could use for Greensboro?

I don’t know really. This custom integration is specific to WRAL. You could use this integration and enter in a zip code for Greensboro and perhaps some of the “current” weather sensors may be fairly accurate, but the forecast data/text will probably be inaccurate for Greensboro.