Weather-Aware Automations
Weather is the sensor you never installed. Here's how forecast data works, which rules are worth building, and why the forecast alone is not enough.
Prices and rates in this article were checked October 2026.
Section 1: Why is the forecast a sensor you do not own? (Introduction)
Weather is a sensor you do not own: forecast temperature, rain, wind and sunrise can trigger blinds, irrigation, heating and windows. Use a local forecast source with a fallback, and test the rule in bad weather before you rely on it.
Most smart home triggers are local: a contact sensor opens, a motion sensor sees, a button is pressed. Weather is different. It is a prediction about the next few hours, delivered over the internet, and it is the only input that can tell the house what is about to happen outside before it happens.
That makes it useful and unreliable in the same breath. The useful horizon is short: six to twenty-four hours, not the ten-day outlook. The long forecast is for planning a trip; the short one is for closing the windows. A forecast can close the windows before the rain, retract an awning before the wind, skip the irrigation before a storm, and pre-cool before a heat wave. It can also be wrong, stale, or for the wrong address. The automation has to be built for both.
This guide covers the data sources, the rules that earn their keep, the failure modes, and a safe way to build the first one. For the wider routines library, start with the Automation hub.
Section 2: Where should the weather data come from?
There are three common paths to forecast data in a smart home.
The National Weather Service
The NWS API is a free, public service from the U.S. government. It provides forecasts, observations, and alerts, requires a User-Agent header that identifies your application, and sets rate limits that are not public but are described as generous for typical use. It is the most authoritative source for U.S. addresses, and the alerts endpoint is the one to use for severe weather.
The lookup is worth understanding even if an integration hides it. The NWS API starts from a latitude and longitude, returns the forecast office and grid coordinates, and then serves the forecast for that grid. The location precision is a few kilometers, not a street address, which is why a hill or a coastline can make the model disagree with the yard.
The NWS API is also the least convenient. It uses a two-step lookup (grid points, then the forecast), and the response is detailed. A local hub or an integration usually wraps it.
Open-Meteo
Open-Meteo is a global forecast API with up to a 16-day horizon, hourly variables, and a free tier for non-commercial use. It does not require an API key for the basic service, and it is a good fit for a household outside the U.S. or for a project that wants a simple JSON response.
The trade is the license and the model. The free tier is non-commercial; a commercial product needs a paid plan. And every forecast API is a model, not a measurement.
A hub’s weather integration
Home Assistant’s weather integration is the abstraction layer: it exposes a common weather entity and a get_forecasts action, and the underlying provider can be the NWS, Open-Meteo, or a local station. That is the practical choice if the automations already live in a hub, because the rules do not have to change when the provider does.
The station in the yard
A local weather station is the observation source, not the forecast. It tells you it is raining now, the wind is 25 mph now, and the temperature dropped below freezing now. The best rules combine both: the forecast decides what to prepare for, and the station confirms that it actually happened.
Section 3: Which weather rules are worth building?
The useful weather automations are the ones that prevent a specific, expensive, or annoying event. A generic “if rain, do something” rule is a toy; these are the ones that earn their place.
Rain: close the windows, skip the irrigation
- Windows: if rain is forecast within the hour and a window sensor is open, send an alert. Closing motorized windows is possible but rare; the alert is the useful part.
- Irrigation: skip the cycle if the forecast probability is high or the local station has measured rain. This is the same logic as a weather-based sprinkler controller, applied to a hose timer or a drip zone. If you want the soil side rather than the forecast, see the soil moisture sensor picks.
- Skylights and awnings: retract or close before the rain, with a wind override.
Freeze: protect the pipes and the plants
- Pipes: if the forecast low is below freezing and the house is empty, raise the thermostat minimum and open the cabinet doors under exterior sinks. A freeze alert is worth more than an automatic fix.
- Plants: bring pots in or cover them; a smart plug on a heat mat is a nice touch for a greenhouse.
- Pool: run the pump during a freeze, and alert if the water temperature drops.
Wind: retract before the gust
- Awnings and shades: retract at a wind threshold, not at a forecast probability. Wind is local and gusty, so the station’s measured gust is the better trigger.
- Umbrellas and patio furniture: a notification is enough; there is no actuator.
- Garage doors: alert if a door is open and the wind is high, but do not auto-close a door without an obstruction sensor.
Heat: pre-cool and shade
- Pre-cooling: if the forecast high is above a threshold, cool the house before the peak and let it drift. This is the same thermal-mass strategy as the time-of-use article, triggered by the forecast.
- Blinds: close west-facing shades in the afternoon to cut solar gain.
- Fans: start the ceiling fan in the room that is about to be used, not the whole house.
Humidity and UV
- Dehumidifier: run when the forecast humidity is high, especially in a basement.
- UV: close shades or start the shade automation when the UV index is high; this is more about furniture and floors than comfort.
- Laundry: a forecast of rain is a reason to dry indoors, if the dryer is smart enough to schedule.
Rules that are not worth building
Some weather ideas sound clever and fail in practice. Closing the windows on a 40 percent rain chance will annoy the household within a week. Turning on the porch light when it rains is a solution without a problem. Running the whole-house fan because the forecast says it is cool outside ignores the indoor temperature and the pollen count.
The test is simple: does the rule prevent a cost, a mess, or a danger? If the answer is “it is neat,” put it in a notification, not an action.
Severe weather alerts
The alerts endpoint is the highest-value weather input. A tornado warning, a flash flood warning, or a high-wind warning should break through the normal notification tiers. It should also be tested: an alert that never arrives because the location is wrong is worse than no alert, because the household believes it is covered.
Section 4: How do weather automations fail?
Forecast automations fail in predictable ways.
- The forecast is a probability, not a promise. A 60 percent chance of rain means it may not rain. A rule that closes the windows on a 60 percent chance will be wrong often enough to annoy.
- The forecast is for a grid cell, not your yard. Coastal fog, a hill, and an urban heat island can all make the local weather different from the model.
- The data goes stale. An API outage, a rate limit, or a hub reboot can leave the automation acting on yesterday’s forecast. Timestamp the data and fail safe.
- The rules conflict. A “close the windows before rain” rule and a “open the windows for fresh air” rule can fight every afternoon. This is the same conflict problem as any automation, with a weather input.
- The action is irreversible. Retracting an awning is reversible; locking someone out is not. Be conservative with locks, doors, and valves.
- The units are wrong. Celsius versus Fahrenheit, mm versus inches, mph versus km/h. A threshold in the wrong unit is a rule that never fires or always fires.
- The provider changes the model. Forecast APIs update their models and their response formats. A rule that parses a field that no longer exists fails silently. Log the raw value, not just the decision.
The manual override
Every weather automation needs a way to say “not today.” A physical button, a voice command, or a dashboard toggle should disable the rule for the rest of the day. A household that cannot override an automation will disable it permanently.
Section 5: How do you build the first weather rule safely?
Start with a notification, not an action. The first version tells you what the rule would have done, and you watch it for a week. If it is right most of the time, promote it to an action.
A useful first test is to replay last week’s weather. Most APIs return past hours, and a local station logs observations. Compare what the rule would have done with what actually happened; if it would have closed the windows on three dry days, the threshold is wrong.
- Pick one event and one action. Rain and the irrigation, or freeze and the thermostat.
- Use two sources for the trigger. The forecast for the prediction, the local station for the confirmation.
- Add hysteresis. Do not toggle at the exact threshold; use a range and a delay.
- Timestamp the data. If the forecast is older than a few hours, skip the action and send a warning.
- Make the override obvious. A button in the app and a physical switch.
- Log the outcome. A note in the automation app or a simple log tells you whether it fired correctly.
The conservative default
For anything that could cause damage or lock someone out, the default should be to alert, not to act. A notification that says “rain expected, irrigation still on” is a better failure than an irrigation system that stops watering during a dry week because the forecast was wrong.
Section 6: What is the plan, and who should skip weather automations? (Conclusion)
- Choose the data source by location and license. NWS for the U.S., Open-Meteo for global, the hub’s integration for portability.
- Start with alerts, not actuators. Watch the rule for a week before it controls anything.
- Build one rule at a time. Rain, freeze, wind, heat, humidity, severe alerts.
- Confirm with a local sensor. Forecast plus observation beats either alone.
- Add hysteresis, timestamps, and an override. The boring parts are what make it reliable.
- Review the logs each season. The forecast model changes, the thresholds should too.
The review is seasonal, not annual. The first cold snap and the first heat wave are the two moments when a threshold that worked in spring is wrong. Check the logs after each, and adjust the numbers before the next season.
Some houses should skip weather automations entirely. A house with no irrigation, no motorized shades, and no basement dehumidifier has little for the weather to control, and a notification from the weather app is enough. The automation earns its place when there is an action worth taking and a cost to getting it wrong.
The forecast is the cheapest sensor in the house and the easiest to misread. Used as a heads-up rather than a command, it is genuinely useful. A weather rule is a small bet that the forecast is right; keep the bet small for the first month, and review it weekly.
Where to buy
Smart weather stations on Amazon
Opens an Amazon search. As an Amazon Associate, we earn from qualifying purchases. No product in this guide was supplied or tested by a manufacturer.
Related reading
- Smart Sprinklers: Weather, Not the Clock — the irrigation version in depth.
- Away Mode: The Long Trip — the freeze and water rules for an empty house.
- The If-But-Only-If Framework — conditions and guardrails.
- Notifications That Don’t Become Noise — which weather alerts deserve to break through.
Sources
- National Weather Service: API Web Service — free public forecasts and alerts, User-Agent requirement, rate limits, checked October 2026
- Open-Meteo: Weather Forecast API — 16-day forecast, hourly variables, non-commercial free tier, checked October 2026
- Home Assistant: Weather — common weather entity and forecast actions across providers, checked October 2026
- Home Assistant: Automations — triggers, conditions and actions used to build the rules, checked October 2026