Foreca

The Foreca integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] uses the Foreca Weather API to provide weather forecasts for any location worldwide. Foreca is an independent weather company that has produced forecasts for consumer and business services since 1996.

You can use this integration free of charge with a Foreca Weather API Freemium subscription, which is strictly for non-commercial use. It also works with Foreca’s premium packages, which allow commercial use and provide higher request limits and further weather products.

Use cases

  • Delay irrigation when the daily forecast predicts rain.
  • Switch on a fan when the hourly forecast shows the temperature climbing.
  • Warn ahead of a frosty night using the daily minimum temperature.

Prerequisites

You need a Foreca Weather API key, from either subscription.

  1. Go to developer.foreca.com and create an account.
  2. Choose the subscription that suits you. Freemium covers everything this integration does.
  3. Verify your email address.
  4. Go to My API and copy your API key.

Configuration

To add the Foreca service to your Home Assistant instance, use this My button:

Manual configuration steps

If the above My button doesn’t work, you can also perform the following steps manually:

API key

The API key from the My API page of your Foreca developer account.

Setup asks only for the API key and automatically adds your Home Assistant home location. You can add more locations afterward, each with its own device and weather entity.

Configuration options

Location

The location to retrieve weather data for. Defaults to the home location set in your Home Assistant configuration.

To add another location later, select Add location on the Foreca entry under Settings > Devices & services. One API key covers as many locations as its request limit allows.

Supported functionality

Weather

The integration creates one weather entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] per location, providing the current conditions, a daily forecast for the next 10 days, and an hourly forecast for the next 48 hours.

The current conditions include temperature, apparent temperature, dew point, humidity, air pressure, wind speed, wind gust speed, wind bearing, visibility, cloud coverage, and UV index.

Data updates

The integration pollsData polling is the process of querying a device or service at regular intervals to check for updates or retrieve data. By defining a custom polling interval, you can control how frequently your system checks for new data, which can help optimize performance and reduce unnecessary network traffic. [Learn more] the Foreca Weather API every 30 minutes. Each update uses three requests per location, around 144 requests per day for one location, which stays well inside the Freemium plan’s daily limit of 2,000 requests. Every location you add polls separately, so that limit allows around 13 of them. Because the integration polls continuously, a Freemium key used this way does not go idle.

The weather.get_forecasts action reads the forecast the integration has already retrieved, so using it in templates and automations costs no extra requests.

Known limitations

  • The API dates a daily forecast rather than timing it, so each daily entry is reported at the start of that day in your Home Assistant time zone.
  • The Freemium plan is for non-commercial use only and is provided on a best-effort basis, without a service level agreement or support. Commercial use needs a paid plan.
  • A Freemium key deactivates after 30 days without any requests.
  • The set of available weather products depends on your Foreca plan. See the pricing page for what each plan includes.

Troubleshooting

Cannot authenticate account

Symptom: The integration reports invalid authentication

Resolution

  • Check that the API key was copied in full from the My API page.
  • Confirm that your subscription is still active in your Foreca developer account.
  • If using a free plan, make sure that you create an account with a verified email address before configuring the integration.
  • A Freemium key that has gone 30 days without any requests is deactivated. Create a new key on the My API page.
Entities show as unavailable

Symptom: Entities show as unavailable

Description

The integration marks entities unavailable when the API cannot be reached or the daily request limit is exceeded.

Resolution

Check your remaining requests on the My API page.

Removing the integration

This integration follows standard integration removal. No extra steps are required.

To remove an integration instance from Home Assistant

  1. Go to Settings > Devices & services and select the integration card.
  2. Next to the entry you want to remove, select the three dots menu. Then, select Delete.
    • Depending on the integration, the entries are listed under one of the following headings:
      • Devices
      • Hubs
      • Services
      • Integration entries
  3. To confirm, select Delete.
    • Home Assistant also deletes the devices and entities of the entry.
  4. If Home Assistant asks you to restart, restart Home Assistant.
  5. If Home Assistant asks whether to also delete the application credentials, select Remove or Keep.

Revoking the API key itself is done on the My API page of your Foreca developer account.