Plotting weather forecast

I’m trying to figure out how to plot the weather forecast, specifically the chance for rain over the next 24 hours per hour. This data comes in via the NWS/NOAA integration, and I can pull out individual sensors like this:

sensor:
  - platform: template
    sensors:
      nws_current_rain_forecast:
        friendly_name: 'Current Rain Forecast'
        value_template: "{{ states.weather.kmht_hourly.attributes.forecast[0].precipitation_probability }}"
        unit_of_measurement: '%'

But that gives me only 1 hour (in this case with index 0, the current hour). Is there any way to pull out the array of forecast[x].precipitation_probability and plot it on a chart? (Y axis is %, X axis is hour).

1 Like