Creating a template sensor and graph for future rainfall forecast?

Tags: #<Tag:0x00007f739eabf0e0>

I’ve been trying to get a graph of the future rainfall forecast as given by the dark sky weather component.

What I’m trying to achieve is basically a mini-graph card version of the rain fall bar chart inthis lovelace card.

When I look at the payload of the dark sky weather (not sensor) component in Node Red, I see each of these values in the path data.attributes.forecast[0].precipitation where the number is how many hours ahead the forecast is for. What I would like to do is get each of these forecast values to a template sensor in some way so I can plot the rain forecast for the next ‘x’ hours. I can’t see how to get all of these value to a single sensor so I could plot it.

My plan was to update the sensor each time the weather component changes but this would mean changing all the value at the same time and as I understand it, the history function of template sensors wouldn’t allow this.

Any ideas?

I had a similar idea. But there is nothing ready-to-use available as far as I could find.
All the existing functions/cards are history-based.

There are plenty of options out there but they require programming skills.

Hey so recently I made a graph for the Dutch Buienradar rain forecast. Buienradar spits out a txt file with live data.

You could possibly (if you know some JavaScript) mess with this one. The code is pretty simple, it creates a graph using chartjs:

https://community.home-assistant.io/t/custom-ui-buienradar-rain-forecast-graph/

1 Like