How to Add Pirate Weather to Home Assistant

Pirate Weather is a free, developer-friendly weather API that serves as a drop-in replacement for the now-defunct Dark Sky API. If you've been running Home Assistant and want accurate, hyperlocal weather data without paying for a commercial service, Pirate Weather is one of the more practical options available. Here's a clear walkthrough of how the integration works and what you need to know before setting it up.

What Is Pirate Weather?

Pirate Weather is an open-source weather forecasting API built by a Canadian developer and hosted on AWS Lambda. It pulls data from NOAA, Environment Canada, and other public meteorological sources to generate forecasts using the same response format Dark Sky used. Because it mirrors the Dark Sky API structure, it integrates cleanly with Home Assistant's existing Dark Sky-compatible components.

The service is free at lower usage tiers and relies on community donations to cover server costs. Unlike major commercial weather APIs, it's maintained transparently — the source code is public, and the data sources are documented.

What You'll Need Before You Start

Before adding Pirate Weather to Home Assistant, gather the following:

  • A Home Assistant instance running a reasonably current version (2023.x or later is recommended)
  • A Pirate Weather API key, which you get by signing up at pirateweather.net
  • Your home latitude and longitude (Home Assistant usually has this configured already under Settings → System → General)
  • Basic comfort with editing YAML files or using the Home Assistant UI integration flow, depending on which method you use

The API key is free to request and takes only a few minutes to obtain.

Two Ways to Add Pirate Weather to Home Assistant

Method 1: HACS (Home Assistant Community Store)

The most common and flexible method is installing the Pirate Weather integration through HACS. This gives you access to more configuration options and stays updated independently of the core Home Assistant release cycle.

Steps:

  1. Open Home Assistant and navigate to HACS → Integrations
  2. Search for "Pirate Weather" and click Download
  3. Restart Home Assistant when prompted
  4. Go to Settings → Devices & Services → Add Integration
  5. Search for "Pirate Weather" and select it
  6. Enter your API key, confirm your location coordinates, and choose your preferred update interval
  7. Select which weather entities you want (current conditions, hourly forecast, daily forecast)

HACS must already be installed on your Home Assistant instance for this method to work. If it isn't, that's a separate setup step.

Method 2: Manual YAML Configuration

If you prefer not to use HACS or want a lightweight setup, you can configure Pirate Weather directly in your configuration.yaml file.

A basic entry looks like this:

weather: - platform: pirateweather api_key: YOUR_API_KEY_HERE latitude: YOUR_LATITUDE longitude: YOUR_LONGITUDE name: Home Weather 

After saving the file, validate your configuration under Developer Tools → Check Configuration, then restart Home Assistant. The weather entity will appear in your dashboard and can be added to Lovelace cards.

Understanding the Data You'll Get 🌦️

Once connected, Pirate Weather surfaces a range of weather attributes as Home Assistant entities:

AttributeDescription
TemperatureCurrent and "feels like" values
HumidityRelative humidity percentage
Wind speed & bearingDirection and speed
UV indexUltraviolet radiation level
Precipitation probabilityChance of rain or snow
Forecast (hourly/daily)Short-range forecasts
ConditionPlain-language weather summary

These attributes can feed automations — for example, triggering smart blinds when UV index exceeds a threshold, or sending an alert when precipitation probability crosses 70%.

Variables That Affect How Well This Works for You

Not every Home Assistant setup will behave identically with Pirate Weather. A few factors shape the experience:

Geographic location matters significantly. Pirate Weather's data quality is strongest in the United States and Canada, where NOAA and Environment Canada data is dense and frequently updated. Users in Europe, Asia, or other regions may find forecast accuracy less consistent because the underlying data sources are sparser outside North America.

API call limits determine how often you can refresh data. The free tier supports a reasonable number of daily calls, but if you set your update interval too aggressively (every few minutes), you can exhaust your quota. Most users find a 10–30 minute update interval strikes the right balance.

Home Assistant version and integration version affect which features are available. Older versions may not support the full forecast entity structure introduced in Home Assistant's weather platform updates. The HACS version of the integration tends to stay more current than any bundled version.

Technical comfort level influences which setup path makes sense. The UI-based HACS flow requires almost no manual coding. The YAML method gives more granular control but demands familiarity with Home Assistant's configuration structure and how to safely edit system files.

Using Pirate Weather in Automations and Dashboards

Once the integration is running, weather data appears as a standard Home Assistant weather entity. You can display it using the built-in Weather Forecast card in Lovelace, or pull individual attributes into template sensors for more customized displays.

For automations, the weather.get_forecasts service action (available in recent Home Assistant versions) lets you query hourly or daily forecast data programmatically — useful for time-based triggers like "water the garden only if rain probability tomorrow is below 40%."

Attributes like precipitation_probability and wind_speed are particularly well-suited to driving automations because they're numerical and easy to use as conditions. 🌡️

What Varies by Setup

A user running Home Assistant OS on a Raspberry Pi 4 with HACS already configured will have a very different setup experience than someone running Home Assistant Container on a NAS without HACS. The underlying API and data are the same, but the integration path, YAML vs. UI management, and available entity types can differ depending on your environment.

Similarly, someone in Chicago automating irrigation based on precipitation forecasts is using Pirate Weather very differently than someone in rural Scotland who just wants a dashboard widget — and forecast reliability will differ between those two locations in ways that matter for real-world automation accuracy.

Whether Pirate Weather is the right fit for your specific Home Assistant setup, automation goals, and location is something only your own configuration can answer. ⚙️