Météo France — Rainfall accumulation over the last N days (French weather API)

Home Assistant Community — Smart Home — Sat, 29 Aug 2026 16:13:06 +0000

Summary

A Home Assistant community member has shared a French-language blueprint that retrieves cumulative rainfall (in mm) over the last N days from Météo France's official DPClim climatology API and stores the result in an input_number entity; it only works with stations in metropolitan or overseas France. The blueprint computes a date range, submits a production "commande" for a given station, polls a second endpoint until the CSV file is ready (or a retry limit is hit), then sums the RR rainfall column and logs an explicit error instead of failing silently if a request fails. Configurable options include the station ID (which can reference a helper and is zero-padded to 8 digits), the API key, the lookback period (default 3 days), the target entity, rest_command names, max retries, and daily trigger time. Setup requires a free API key from portail-api.meteofrance.fr, two rest_command entries targeting the DPClim v1 API, and a numeric station ID from Météo France's station metadata dataset, with the author recommending station types 0, 1, or 2. The author uses it within a larger automation that adjusts tomato-watering duration based on recent rainfall.


Hi everyone,

I’d like to share a blueprint I put together for anyone gardening, watering automatically, or generally caring about rainfall history: it pulls the cumulative precipitation (mm) over the last N days from Météo France’s official Climatologie - Données Publiques de Météo-France (DPClim) API and writes the result into an input_number.

Heads up for non-French users: this blueprint is written and documented in French, since it relies entirely on Météo France’s public API — it will only return useful data for stations located in France (metropolitan or overseas). If that’s not your situation, it probably won’t be directly useful to you, but feel free to take a look at the logic if you’re building something similar against another national weather API.

You’ll need a free Météo France API key from portail-api.meteofrance.fr, and two rest_command entries in your configuration.yaml pointing at the DPClim v1 API (https://public-api.meteofrance.fr/public/DPClim/v1). The blueprint description includes a ready-to-paste example.

You’ll also need your station’s numeric ID, which you can find in Météo France’s station metadata dataset. I’d recommend sticking to station_type 0, 1, or 2 for reliable daily data.

Feedback and suggestions welcome — this is part of a larger automation I use to decide how long to water my tomatoes based on recent rainfall, happy to share that too if there’s interest.


Original article: https://community.home-assistant.io/t/meteo-france-rainfall-accumulation-over-the-last-n-days-french-weather-api/1023137 Source: Home Assistant Community