Weather integration for Home Assistant backed by the Foreca Weather API.
One weather entity and 32 sensors:
weatherentity with current conditions, a 10-day daily forecast and a 48-hour hourly forecast- Precipitation nowcast: when precipitation starts within the next hour, and the average and total expected over that hour
- Measurements from the nearest reporting weather station: temperature, humidity, and — disabled by default — pressure, wind speed, wind gust speed and snow depth
- Today's outlook: thunderstorm probability, precipitation intensity and type, solar radiation now and for the day, snow depth, snow accumulation, sunshine duration and Foreca's own forecast confidence
- Air quality: general AQI, dominant pollutant, daily AQI for the next three days, and per-pollutant sub-indices (disabled by default)
- Plan usage: requests made today and this month, so you can watch your quota
Air quality follows the US EPA air quality index. The values come from atmospheric composition models, blended with measurements from air quality monitoring stations where one is close by: near a station the first hours lean on the measurements and then fade into the model. Further from any station, the values are model output alone.
Create a free account at developer.foreca.com, pick the Freemium plan, verify your email and copy the key from My API. The integration polls every 30 minutes, eight requests per poll for one location, so about 384 requests per day. That is well inside the Freemium plan's 2,000 requests per day; the count doubles for a second location, and the limit allows about five.
The Freemium plan is free for non-commercial use — hobbyist, student, and research projects — and is provided without an SLA or support. Commercial use, a larger quota, or the rest of Foreca's weather products need a paid plan.
Foreca is built into Home Assistant from 2026.11. Add it under Settings >
Devices & services; the integration page
covers setup. The built-in integration has the weather entity so far, and
sensors for current conditions are on their way into
Home Assistant Core
(homeassistant/components/foreca/). Core serves forecast values only through
the weather entity's weather.get_forecasts action, so the sensors here that
read a forecast step (today's outlook, the precipitation nowcast, the daily air
quality) stay in this repository. The API client lives in
pyforeca.
Both use the domain foreca, so a copy of this repository in
custom_components/foreca takes the place of the built-in integration. The two
store their entries differently: this copy makes one entry per location, the
built-in one makes one entry per API key with locations under it. An entry made
here loads under the built-in integration without any weather entity. To switch:
- Delete the Foreca entries under Settings > Devices & services.
- Remove
custom_components/forecaand restart Home Assistant. - Add Foreca again with the same API key.
This repository will be archived once the current-condition sensors are in Core.
python3.13 -m venv .venv
.venv/bin/pip install homeassistant pytest-homeassistant-custom-component -e ../pyforeca
.venv/bin/pytest
# Run a development Home Assistant instance against this component
mkdir -p config/custom_components
ln -sfn ../../custom_components config/custom_components/foreca
.venv/bin/hass -c configMaintained by Foreca in the foreca-dev organization. Released under the MIT License.