Setting Up the Pirate Weather Integration in Home Assistant

There are several weather forecasting options in Home Assistant. My current preference is Pirate Weather. It’s a free, Dark Sky–style API that gives you current conditions, hourly forecasts, and daily forecasts that can power automations like rain alerts, lighting adjustments, or energy usage planning.

In this post, we’ll walk through how to add Pirate Weather to Home Assistant and start using its entities.

Step 1: Get a Pirate Weather API Key

Pirate Weather requires an API key (free).

  • Go to the Pirate Weather website.
  • Sign up for an account and generate an API key.
  • Copy that key somewhere safe — you’ll need it in the next step.

Step 2: Add the Integration in Home Assistant

  • In Home Assistant, go to Settings → Devices & Services.
  • Click + Add Integration.
  • Search for Pirate Weather.
  • Enter your API key and your latitude/longitude (Home Assistant will usually prefill your location).
  • Save and exit.

That’s it! You’ll now have a new weather.pirateweather entity available.

Explore the Entities

Once added, Pirate Weather will give you:

  • A main weather entity: weather.pirateweather
  • Forecast attributes: temperature, condition, precipitation, wind, humidity, and more.
  • Additional sensors may appear, depending on your setup (precipitation probability, daily highs and lows, etc.).

You can see them in Developer Tools → States.

Example Dashboard Card

To show Pirate Weather on your Lovelace dashboard, you can add the built-in weather card.

  • Go to your dashboard, click Edit → Add Card → Weather Forecast, and choose your weather.pirateweather entity.

Example Automation with Pirate Weather

Here’s an example automation that turns on a lamp when Pirate Weather reports that it’s cloudy:

alias: Turn On Lamp When Cloudy
description: Turns on a lamp when Pirate Weather reports cloudy conditions
mode: single

trigger:
- platform: state
entity_id: weather.pirateweather
to: 'cloudy'

action:
- service: light.turn_on
target:
entity_id: light.living_room_lamp

A Few Tips

  • If you want more frequent updates, check the update interval in the integration’s options.
  • Pirate Weather supports multiple forecast modes (hourly, daily) — useful if you want to trigger automations based on short-term rain vs. long-term temperature swings.
  • Combine Pirate Weather data with conditions in your automations (e.g., “only alert me if rain probability > 60%”).

How are you utilizing weather data in your automations?