Home Assistant

Heads-up alerts for rain, snow, wind, and freezing nights

On the hour or at the times you pick, a blueprint scans the next hours of a weather forecast and sends one alert per condition, with the first time and the worst value.

Difficulty · IntermediateSetup · 20–40 minutesHA · 2024.10 or newer
Get the pack · from $19Have us set it up

A morning summary is too late if the freeze starts at 2 am, and too early if the rain is not until evening. This blueprint calls weather.get_forecasts on a schedule, looks through the next block of hours, and sends a separate notification for rain, snow, wind, or a freeze. Each one says when it starts and what the worst value in the window is. The same condition stays quiet until a cooldown expires.

A single morning message, instead of a condition watch, is morning weather briefing. One script that every other automation should call so quiet hours live in one place is quiet-hours notification hub. An alert that keeps repeating until you deal with it is nagging repeatable alert.

What problem it solves

You want a push when rain, snow, wind, or a freeze is actually in the upcoming hours, not a forecast card you have to go and read.

How it works

  1. Schedule. Hourly mode runs at minute 05 of every hour. Chosen-times mode runs at up to three clock times and ignores the hourly tick. Set an unused time equal to the first one. Pick one mode. Both triggers exist so the file stays valid. The mode decides which one is allowed to continue.
  2. Forecast. weather.get_forecasts with type: hourly. If that returns nothing, it tries type: daily. Hours are kept from now through the next N hours (default 18). A daily row counts when its day overlaps that window. Values stay in the unit the weather entity already uses. This blueprint does not convert them.
  3. Rain. Any point whose precipitation probability is at or above the threshold (default 60%). The message has the first time and the highest probability.
  4. Snow. Any point whose condition text contains “snow”. The message has the first time and that condition word.
  5. Wind. The greater of wind speed and wind gust (some integrations call the gust wind_gust_speed, some wind_gust). At or above the limit (default 40, in the entity’s own unit). The message has the first time and the strongest value.
  6. Freeze. Any temperature strictly below the threshold (default 0, in the entity’s own unit). The message has the first time and the coldest value. While a freeze is in the window, an optional action runs on every check. That is the place for a heat-tape switch. Turning a switch on every hour is harmless. A notification in that action will repeat, which is why the freeze notification itself is separate and uses the cooldown.
  7. Cooldown. Four datetime helpers, one per condition. A notification writes the current time. The same condition does not notify again until the cooldown (default 6 hours) has passed. The other conditions are independent.
  8. Quiet hours. Off by default. When on, notifications are skipped inside the window. The window may wrap past midnight. A start equal to the end means no quiet hours. The freeze action still runs during quiet hours, so a heat tape is not suppressed. The cooldown is not consumed by a skipped notification, so the alert can still go out once the window ends.

Snippet

The forecast call, then the scan. The pack stores the response and walks it. This is the call.

actions:
  - action: weather.get_forecasts
    target:
      entity_id: !input weather
    data:
      type: hourly
    response_variable: hourly_forecast

A missing hourly forecast falls back to type: daily. A point with no precipitation probability is not rain. A point with no temperature is not a freeze.

Setup outline

  1. Copy helpers/forecast_weather_alerts.yaml into config/packages/ and restart, or create four datetime helpers that have both a date and a time. Copy the blueprint into config/blueprints/automation/edotdev/ and reload blueprints.
  2. In Developer tools → Actions, call weather.get_forecasts on your weather entity with type: hourly. Confirm the response has precipitation_probability, condition, wind_speed, and temperature. If hourly is empty, try daily. If both are empty, this blueprint has nothing to say.
  3. Create the automation. Pick the weather entity and notify.notify, or the Companion service you actually want, such as notify.mobile_app_phone.
  4. Set the rain percent, the wind limit, and the freeze threshold in the units you just saw in that response.
  5. Leave quiet hours off for a test. Temporarily set the cooldown to 1 hour and the rain threshold to 0 if you need a notification today. Put the real numbers back.
  6. Optional: in the freeze action, turn on the heat-tape switch. Confirm a second check does not turn it off. This blueprint never turns that switch off.

Troubleshooting

  • No notifications, and the trace stops after the forecast. The hourly and daily lists were empty, or every point was outside the hour window. Increase the hours to scan, or fix the weather entity. A weather entity that only has a current condition, and no forecast service, cannot drive this.
  • Rain never fires in a place that uses 0–1 instead of 0–100. The threshold is compared with the number the integration returns. If you see 0.6 in the response, set the threshold to 0.6, not 60.
  • Wind is always on. The limit is 40 km/h and the entity reports m/s, or the other way around. Read one wind_speed from the service response and set the limit in that unit.
  • The same alert every hour. The datetime helper was not updated. The trace should show input_datetime.set_datetime after the notify. A helper with date only, or the wrong entity, will not record the cooldown.
  • Quiet hours ate a freeze and the heat tape stayed off. Quiet hours skip notifications only. The freeze action runs whenever a below-threshold temperature is in the window. If the action is empty, nothing turns the tape on. Put the switch in the action, not only in the notification.
  • Chosen times also run every hour. Schedule is still Hourly. The clock trigger is ignored in that mode.
  • Snow in the rain message only. The condition string did not contain “snow” (some integrations say hail or rainy with a temperature below zero). This blueprint treats snow as the condition text, not as “cold rain.”

Credits

Scanning an hourly forecast for rain, snow, and a freeze is the idea in Hourly weather alert notifier.

Changelog

v1.0 · Nov 2, 2026: First publish.