Add together precipitation forcast for the next hours

I want to get notified every morning if there is any precipitation in the following hours. But I can’t figure out, how I can add the hourly forecasted amount of rainfall (which the dwd weather integration provided)

That’s what I got so far:

and that’s the forecasted rainfall (as mm):

Type: string
0.5

0.5

0.1

0.1

0.2

0.3

0.4

0.5

0.5

0.6

0.6

0.6

Any help is appreciated!

{{ state_attr('weather.forecast_home_hourly', 'forecast')[:12] | map(attribute='precipitation') | sum | round(2) }}
2 Likes

Wow, thank you very much! Works perfectly as I wanted :slight_smile:

1 Like