My first BlueprintâŚ
OpenWeatherMap Minute Forecast Action
v1.0
Uses the OpenWeatherMap integration to poll the API and then call a script with information on precipitation (rain / snow) over the next hour.
⸠GitHub link here
Introduction
Minute-by-minute forecasting (sometimes called âMinutelyâ forecasting or âNowcastingâ) is hyper-local, hyper-accurate weather forecasting over a very short timeframe. Since Home Assistant 2025.3, the OpenWeatherMap integration provides precipitation forecasting for the coming 60 minutes.
Typically, the source of this information might be rain radar combined with wind direction and predictive algorithms. However, even these forecasts can be affected by local topology. For example, if you live on a hill, moist air might be driven upwards towards the peak where it expands and cools to form precipitation that was not visible sooner. Conversely, on the other side of the hill, air may become drier, leading to a rain âshadowâ unless a significant amount is expected.
To help adjust for these local effects, this Blueprint comes with different âdetectionâ modes. You will need to experiment for your specific location: there is no catch-all solution.
Prerequisites
- Home Assistant v2025.3+
- The OpenWeatherMap integration
- An OpenWeatherMap API key (free below a certain threshold): sign up here
Installation
- Install the OpenWeatherMap integration:
Settings â Devices & services â Integrations â + Add Integration â OpenWeatherMap - Ensure your location is accurate: check the OpenWeatherMap entities match the conditions you see outside
- (Optional) Confirm Minute forecasting: `Developer Tools â Actions â openweathermap.get_minute_forecast and select your OpenWeatherMap entity
- This should show the weather object returned, with separate properties for each minute of the next hour (all times are UTC)
- (Optional) Confirm Minute forecasting: `Developer Tools â Actions â openweathermap.get_minute_forecast and select your OpenWeatherMap entity
- IMPORTANT:
Settings â Devices & services â Integrations â OpenWeatherMap â [3-dot menu] â System Optionsand disable âEnable polling for changesâ- If you donât disable this setting, OpenWeatherMap will poll the API every few minutes in addition to the polling determined by this Blueprint, increasing your API usage without processing the data, and potentially increasing / creating API costs.
Configuring
All precipitation rates are in metric (mm / hour) as supplied by OpenWeatherMap. This is not configurable.
-
OpenWeatherMap Entity: The OWM entity created for your location (probably named simply âOpenWeatherMapâ)
-
Polling Frequency: Minutes between API polls. Remember that
/1will poll the API every minute / 1,440 times per day./2= 720 calls / day. -
Detection types:
Detection types must be enabled to be used. Static detection is enabled by default as it is the simplest to understand but probably the least accurate.- Static rate detection: Action will trigger if a single data point, out of 60, is higher than than the
Precipitation rate. - Linear rate-change detection: Sets a threshold for now (T-0 minutes) and another for one hour (T-60 minutes). Uses linear interpolation to adjust the threshold for each minute. For example, setting rates of 1 mm/h (T-0 minutes) and 9 mm/h (T-60 minutes) would result in a threshold of 5 mm / h at T-30 minutes.
Average rate detection(coming soon)
Note that setting both Linear rates to the same value is functionally identical to setting the Static rate to that value.
- Static rate detection: Action will trigger if a single data point, out of 60, is higher than than the
-
Action script: The script to be called after every run. Note that the script will be called whether precipitation is detected or not: this is for those use-cases where the absence of rain or snow is as important as the presence of rain or snow.
Output
The Blueprint will output an object of the following format:
precipitation:
triggered: true
static:
triggered: true
rate: 1.2
minutes_from_now: 34
linear:
triggered: false
rate: 0
minutes_from_now: 0
precipitation.triggered will be true if either precipitation.static.triggered or precipitation.linear.triggered are true. Your script should evaluate one or more or these boolean values to determine how to proceed: the Blueprint itself will intentionally not do this.
Example script
Example script to receive notifications of incoming precipitation. Note that you will need to create a Helper of type input_datetime called openweathermap_minute_forecast_last_notified - this is used to rate-limit notifications, in this case to once per hour (60 * 60 seconds). In this case, notifications are only provided during daylight hours or when I am unlikely to be sleeping.
fields:
precipitation:
selector:
object: {}
default:
static:
triggered: false
rate: 0
minutes_from_now: 0
linear:
triggered: false
rate: 0
minutes_from_now: 0
sequence:
- if:
- condition: sun
before: sunset
after: sunrise
enabled: false
- before: "22:00"
condition: time
- after: "08:00"
condition: time
- alias: If more than an hour since last alert
condition: template
value_template: >-
{{ as_timestamp(now()) -
as_timestamp(states('input_datetime.openweathermap_minute_forecast_last_notified'))
| int > (60 * 60) }}
enabled: false
then:
- variables:
precipitation: "{{ precipitation }}"
- action: input_datetime.set_datetime
target:
entity_id: input_datetime.openweathermap_minute_forecast_last_notified
data:
datetime: "{{ now() }}"
alias: Update 'last notified' input datetime
- action: notify.notify
data:
title: â Precipitation alert
message: |-
{% if precipitation.static.triggered %}
{{ "⸠" ~ precipitation.static.rate ~ " mm/h of precipitation is expected in " ~ precipitation.static.minutes_from_now ~ " minutes (static detection)" }}
{% endif %}{% if precipitation.linear.triggered %}
{{ "⸠" ~ precipitation.linear.rate ~ " mm/h of precipitation is expected in " ~ precipitation.linear.minutes_from_now ~ " minutes (linear detection)" }}
{% endif %}
enabled: true
alias: "Notification: Precipitation alert"
Tips
- Get started using Static detection. Depending on your location, you may find that this either provides false-positives or false-negatives, as precipitation predicted towards the end of the hour either appears unexpectedly or dissapates before reaching you.
- When you know precipitation is incoming, use
Developer Tools â Actions â openweathermap.get_minute_forecastto see how the weather forms around your location. There is no shortcut here: every location on the planet is different.