AccuWeather

The AccuWeather integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] uses the AccuWeather web service as a source for weather data for your location. A paid subscription is required to use this integration.

Use cases

  • Show the current weather and the daily and hourly forecasts for your location on your dashboard.
  • Get a notification when the forecasted UV index is high, so you remember to apply sunscreen before you go outside.
  • Pause your garden watering when it rains.
  • Get a warning when the forecasted thunderstorm probability or wind gusts are high, so you can secure your outdoor furniture or retract your awning.
  • Plan your day with the RealFeel temperature and the forecasted hours of sun.

See AccuWeather automation examples for examples you can use as a starting point.

Prerequisites

To use this integration, you need an AccuWeather API key.

  1. Go to the AccuWeather APIs page and register an account.
  2. Subscribe to one of the available plans. If you want to configure the integration for more than two locations, you need a plan higher than Starter.
  3. In the Subscriptions & Keys section, create an application to generate an API key.

You can test your newly created API key on the AccuWeather location search page.

Configuration

To add the AccuWeather 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:

  • Browse to your Home Assistant instance.

  • Go to Settings > Devices & services.

  • In the bottom right corner, select the Add Integration button.

  • From the list, select AccuWeather.

  • Follow the instructions on screen to complete the setup.

API key

The API key generated in the AccuWeather APIs portal. You can find it in the Subscriptions & Keys section after you create an application.

Location

The location you want weather data for. Select it on the map. By default, the map shows your Home Assistant home location.

Supported functionality

The AccuWeather integration provides the following entities for each configured location. Some sensors are disabled by default. You can enable them after you set up the integration.

Weather

  • Weather
    • Description: The current weather and forecasts for the location. Use it with the weather forecast card on your dashboard, or with the weather.get_forecasts action in automations and scripts.
    • Current values: Condition, temperature, apparent temperature, dew point, humidity, pressure, wind speed, wind gust speed, wind bearing, visibility, cloud coverage, and UV index.
    • Forecasts: Daily and hourly.
    • Remarks: The entity is named after the location.

Current conditions sensors

  • Apparent temperature
    • Description: The perceived outdoor temperature, taking wind and humidity into account.
    • Remarks: Disabled by default.
  • Cloud ceiling
    • Description: The height of the cloud base.
    • Unit: m
  • Cloud cover
    • Description: The percentage of the sky covered by clouds.
    • Unit: %
    • Remarks: Disabled by default.
  • Dew point
    • Description: The temperature at which the air becomes saturated with water vapor.
    • Remarks: Disabled by default.
  • Humidity
    • Description: The relative humidity.
    • Unit: %
    • Remarks: Disabled by default.
  • Precipitation
    • Description: The amount of precipitation in the past hour.
    • Unit: mm/h
    • Attributes:
      • Type: The type of precipitation, such as rain or snow.
  • Pressure
    • Description: The atmospheric pressure.
    • Unit: hPa
    • Remarks: Disabled by default.
  • Pressure tendency
    • Description: The direction in which the atmospheric pressure is changing.
    • Options: Falling, Rising, Steady
  • RealFeel temperature
    • Description: The AccuWeather RealFeel temperature, which describes how the weather feels.
  • RealFeel temperature shade
    • Description: The AccuWeather RealFeel temperature in the shade.
    • Remarks: Disabled by default.
  • Temperature
    • Description: The current outdoor temperature.
    • Remarks: Disabled by default.
  • UV index
    • Description: The current ultraviolet index.
    • Unit: UV index
    • Attributes:
      • Level: The UV level description, such as Low or High.
    • Remarks: Disabled by default.
  • Wet bulb temperature
    • Description: The lowest temperature that can be reached by evaporating water into the air.
    • Remarks: Disabled by default.
  • Wind chill temperature
    • Description: The perceived temperature caused by the combination of air temperature and wind.
    • Remarks: Disabled by default.
  • Wind gust speed
    • Description: The speed of wind gusts.
    • Unit: km/h
    • Remarks: Disabled by default.
  • Wind speed
    • Description: The wind speed.
    • Unit: km/h
    • Remarks: Disabled by default.

Daily forecast sensors

The integration creates a set of forecast sensors for today and for each of the next 4 days. The name of each sensor ends with the day number. Day 0 is today, day 1 is tomorrow, and so on. For example, Hours of sun day 1.

A forecast sensor is created for a given day only when AccuWeather provides that data for your location. Air quality and pollen data, in particular, is not available everywhere.

  • Air quality day N
    • Description: The forecasted air quality category.
    • Options: Good, Moderate, Unhealthy, Very unhealthy, Hazardous
  • Cloud cover day N and Cloud cover night N
    • Description: The forecasted cloud cover during the day and during the night.
    • Unit: %
    • Remarks: Disabled by default.
  • Condition day N and Condition night N
    • Description: A text description of the forecasted weather conditions during the day and during the night.
  • Grass pollen day N, Mold pollen day N, Ragweed pollen day N, and Tree pollen day N
    • Description: The forecasted pollen concentration for each pollen type.
    • Unit: p/m³
    • Attributes:
      • Level: The pollen level: Low, Moderate, High, Very high, or Extreme.
    • Remarks: Disabled by default.
  • Hours of sun day N
    • Description: The forecasted number of hours of sunshine.
    • Unit: h
  • RealFeel temperature max day N and RealFeel temperature min day N
    • Description: The forecasted highest and lowest RealFeel temperature.
  • RealFeel temperature shade max day N and RealFeel temperature shade min day N
    • Description: The forecasted highest and lowest RealFeel temperature in the shade.
    • Remarks: Disabled by default.
  • Solar irradiance day N and Solar irradiance night N
    • Description: The forecasted solar irradiance during the day and during the night.
    • Unit: W/m²
    • Remarks: Disabled by default.
  • Thunderstorm probability day N and Thunderstorm probability night N
    • Description: The forecasted probability of a thunderstorm during the day and during the night.
    • Unit: %
  • UV index day N
    • Description: The forecasted ultraviolet index.
    • Unit: UV index
    • Attributes:
      • Level: The UV level: Low, Moderate, High, Very high, or Extreme.
  • Wind gust speed day N and Wind gust speed night N
    • Description: The forecasted speed of wind gusts during the day and during the night.
    • Unit: km/h
    • Attributes:
      • Direction: The wind direction, such as NW.
    • Remarks: Disabled by default.
  • Wind speed day N and Wind speed night N
    • Description: The forecasted wind speed during the day and during the night.
    • Unit: km/h
    • Attributes:
      • Direction: The wind direction, such as NW.

AccuWeather automation examples

The following examples show how to use AccuWeather data in Home Assistant automations. They are starting points, and you can adapt them to create your own automations.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the visual automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: Notify when the forecasted UV index is high

This automation sends a notification to your mobile device when today’s forecasted UV index rises above 5. The UV index day 0 sensor shows the UV index forecast for today and is enabled by default. Replace the entity IDs in the example with the entity IDs of your own AccuWeather sensor and mobile device.

  • Trigger: Numeric state crossed threshold
    • Entity: Home UV index day 0 (sensor.home_uv_index_day_0)
    • Above: 5
  • Action: Send a notification message
    • Target: My Device (notify.my_device)
    • Title: High UV index today
    • Message: A message with the forecasted UV index
YAML example for notifying when the forecasted UV index is high
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Notify when the forecasted UV index is high"
triggers:
  - trigger: numeric_state
    entity_id: sensor.home_uv_index_day_0
    above: 5
actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_device
    data:
      title: "High UV index today"
      message: >
        The forecasted UV index for today is
        {{ states('sensor.home_uv_index_day_0') }}.

Automation: Turn off the garden sprinkler when it starts raining

This automation turns off your garden sprinkler when AccuWeather reports precipitation at your location. The Precipitation sensor shows the amount of precipitation in the past hour. Replace the entity IDs in the example with the entity IDs of your own AccuWeather sensor and sprinkler switch.

  • Trigger: Numeric state crossed threshold
    • Entity: Home Precipitation (sensor.home_precipitation)
    • Above: 0
  • Action: Turn off switch
    • Target: Garden sprinkler (switch.garden_sprinkler)
YAML example for turning off the garden sprinkler when it starts raining
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Turn off the garden sprinkler when it starts raining"
triggers:
  - trigger: numeric_state
    entity_id: sensor.home_precipitation
    above: 0
actions:
  - action: switch.turn_off
    target:
      entity_id: switch.garden_sprinkler

Data updates

By default, 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 current weather condition data from the AccuWeather API every 10 minutes, daily forecast data every 6 hours, and hourly forecast data every 30 minutes.

Known limitations

  • AccuWeather matches the coordinates you select on the map to one of its locations. You can add each AccuWeather location only once, so you cannot add two points on the map that match the same AccuWeather location.
  • Your AccuWeather plan limits the number of API requests. Each configured location makes its own requests, at the intervals described in Data updates. When the limit is reached, the entities become unavailable. They become available again at the next data update after AccuWeather resets the limit.

Troubleshooting

Failed to connect, Invalid API key, or request limit exceeded during setup

Symptom: Setup shows “Failed to connect”, “Invalid API key”, or a request limit message

When you try to set up the integration, the form shows one of these messages:

  • “Failed to connect”
  • “Invalid API key”
  • “The allowed number of requests to the AccuWeather API has been exceeded. You have to wait or change the API key.”

Description

Before it creates the entry, the integration checks your API key with AccuWeather. The message tells you what went wrong:

  • “Failed to connect”: Home Assistant can’t reach the AccuWeather service, or the service returned an error.
  • “Invalid API key”: AccuWeather doesn’t accept the key you entered.
  • “The allowed number of requests to the AccuWeather API has been exceeded…”: The request limit of your AccuWeather plan has been reached for now.

Resolution

  • If the form shows “Failed to connect”, check that Home Assistant can reach the internet, then try again.
  • If the form shows “Invalid API key”, check the key in the Subscriptions & Keys section of the AccuWeather APIs page. Copy the key again and make sure it has no extra spaces.
  • If the form shows the request limit message, wait and try again later. You can also enter an API key from a different AccuWeather account or application. If this happens often, check whether the same API key is also used by other applications or by another Home Assistant installation.
Weather entities are unavailable

Symptom: AccuWeather entities become unavailable

The AccuWeather entities show as unavailable. If this happens while Home Assistant starts, the AccuWeather entry on the Settings > Devices & services page shows Retrying setup. Settings > System > Logs contains a message like “An error occurred while retrieving weather current conditions data from the AccuWeather API: …”, “An error occurred while retrieving weather forecast data from the AccuWeather API: …”, or “Timeout fetching … data”.

Description

The integration marks its entities as unavailable when it can’t get data from AccuWeather. The log message tells you why:

  • The text after the colon starts with RequestsExceededError: The request limit of your AccuWeather plan has been reached. Each location you add makes its own requests, so adding locations uses the limit up faster.
  • The text after the colon starts with ApiError: AccuWeather returned an error. This is usually temporary.
  • The text after the colon starts with ClientConnectorError: Home Assistant can’t reach the AccuWeather service.
  • “Timeout fetching … data”: AccuWeather didn’t answer in time.

Resolution

  1. Check that Home Assistant can reach the internet. The integration tries again automatically, and the entities become available again once AccuWeather responds.
  2. To see how many requests are left, go to Settings > System > Repairs, select the three dots menu, and select System information. Look for Remaining allowed requests in the AccuWeather section. If you added several locations, the value comes from one of them. It applies to all locations only if they use the same API key.
  3. If the requests are used up, wait until AccuWeather allows requests again. To prevent this, remove locations you don’t need, or subscribe to a plan with a higher limit on the AccuWeather APIs page. The entities become available again after the next successful update.
Authentication failed, please update your API key

Symptom: Home Assistant asks you to reauthenticate the AccuWeather integration

Home Assistant asks you to reauthenticate the AccuWeather integration, or the log shows a message like “Authentication failed for Home, please update your API key”. The name in the message is the name of your location.

Description

Your API key is no longer accepted by AccuWeather. This happens, for example, when the key was deleted or the application it belongs to was removed on the AccuWeather APIs page.

Resolution

  1. Check the Subscriptions & Keys section on the AccuWeather APIs page. If the key is missing or no longer active, create a new one there.
  2. If Home Assistant shows a reauthentication prompt, select it and enter the new API key.

Removing the integration

This integration follows standard integration removal.

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.