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: