Unable to get detailed_description from NWS Weather Forcast

I’m using the detailed_description data from the National Weather Forcast to create a spoken daily update of the day’s news and weather. With the recent update to HA the data does not seem to be available any longer.

I’ve reverted back to the previous release and will not be upgrading unless there’s a work around or resolution.

An example of the data:

forecast: 
- detailed_description: Mostly cloudy, with a high near 50. North wind 10 to 15 mph.
  datetime: '2024-04-04T08:00:00-05:00'
  precipitation_probability: 0
  is_daytime: true
  condition: cloudy
  wind_bearing: 0
  temperature: 50
  dew_point: 31
  wind_speed: 12.5
  humidity: 72

Please see the NWS change in the Backward-incompatible changes in the 2024.4 Release Notes.

Yes I’m aware - but the detailed_description is not being pulled as far as I can see.

Looks like there may be a related issue on GitHub

I’m seeing the same behavior - the detailed_descriptions are no longer being populated. Validated this on my test Home Assistant install - 2024.3 works correctly; 2024.4 does not.

I’ve been informed by developers that since the weather.get_forcast service call has been deprecated the National Weather Service integration will not be providing the STATES information any longer. Instead we’ll have to do service calls for weather:get_forcasts to get the information. Meaning that we’ll have to do some creative scripting to first get the information then extract it for our needs.

I’m fairly new to Home Assistant, so apologies if I’m restating something that’s already been said in this thread. I’ve been trying to get this to work as well. I have a template sensor that uses get_forecasts, and it works properly:

- trigger:
  - platform: time_pattern
    hours: /1
  action:
    - service: weather.get_forecasts
      data:
        type: twice_daily
      target:
        entity_id: weather.khio
      response_variable: daily
  sensor:
    - name: Daily Forecast
      unique_id: daily_forecast
      state: "{{ now().isoformat() }}"
      icon: mdi:hours-24
      attributes:
        forecast: "{{ daily['weather.khio'].forecast }}"

And here’s what the sensor data looks like:

The issue is how to get the detailed_description back out. I don’t yet know enough to do the “creative scripting”. Has anyone gotten a working solution for this?

FYI - I was continuing to research this, and came across a similar post for different data that provided the solution. Here’s what I’m using:

{% set forecast = state_attr('sensor.daily_forecast','forecast') %}
{{ forecast[0].detailed_description }}

Now I can get the forecast in my morning voice briefing. :partying_face:

This works for me:

- trigger:
    - platform: time_pattern
      minutes: 10
  action:
    - service: weather.get_forecasts
      data:
        type: twice_daily
      target:
        entity_id: weather.kmsp_daynight
      response_variable: daily
  sensor:
    - name: "Day Forecast 1"
      unique_id: "day_forecast_1"
      state: "{{ daily['weather.kmsp_daynight'].forecast[0].detailed_description }}"

    - name: "Day Forecast 2"
      unique_id: "day_forecast_2"
      state: "{{ daily['weather.kmsp_daynight'].forecast[1].detailed_description }}"

    - name: "Day Forecast 3"
      unique_id: "day_forecast_3"
      state: "{{ daily['weather.kmsp_daynight'].forecast[2].detailed_description }}"

    - name: "Day Forecast 4"
      unique_id: "day_forecast_4"
      state: "{{ daily['weather.kmsp_daynight'].forecast[3].detailed_description }}"

Replace the weather.kmsp_daynight service with your weather service sensor.
I have a separate templates.yaml folder, this goes at the top.

1 Like